llc: fix non-const printk warning
Subsystems (3)
PATCH 1/2 llc: fix non-const printk warning
Mark some strings as const.
net/llc/af_llc.c +3 -3
@@ -1118,11 +1118,11 @@ static const struct proto_ops llc_ui_ops .sendpage = sock_no_sendpage, }; -static char llc_proc_err_msg[]__initdata = +static const char llc_proc_err_msg[]__initconst =KERN_CRIT "LLC: Unable to register the proc_fs entries\n" ; -static char llc_sysctl_err_msg[]__initdata = +static const char llc_sysctl_err_msg[]__initconst =KERN_CRIT "LLC: Unable to register the sysctl entries\n" ; -static char llc_sock_err_msg[]__initdata = +static const char llc_sock_err_msg[]__initconst =KERN_CRIT "LLC: Unable to register the network family\n" ;static int __init llc2_init (void )
PATCH 2/2 snap: handle registration error and compile warning
If this module can't load, it is almost certainly because something else is already bound to that SAP. So in that case, return the same error code as other SAP usage, and fail the module load.
Also fixes a compiler warning about printk of non const.
net/802/psnap.c +4 -3
@@ -95,15 +95,16 @@ static int snap_request(struct datalink_EXPORT_SYMBOL (register_snap_client);EXPORT_SYMBOL (unregister_snap_client); -static char snap_err_msg[]__initdata = +static const char snap_err_msg[]__initconst =KERN_CRIT "SNAP - unable to register with 802.2\n" ;static int __init snap_init (void ) { snap_sap =llc_sap_open (0xAA , snap_rcv); - -if (!snap_sap) +if (!snap_sap) {printk (snap_err_msg); +return -EBUSY ; + }return 0 ; }
Re: [PATCH 2/2] snap: handle registration error and compile warning
Em Fri, Feb 20, 2009 at 10:03:02AM -0800, Stephen Hemminger escreveu:
Quoted 7 lines
If this module can't load, it is almost certainly because something else is already bound to that SAP. So in that case, return the same error code as other SAP usage, and fail the module load.
Also fixes a compiler warning about printk of non const.
Signed-off-by Stephen Hemminger <[email protected]>
Thanks,
Quoted 24 lines
net/802/psnap.c +4
-4@@ -95,15 +95,16 @@ static int snap_request(struct datalink_EXPORT_SYMBOL (register_snap_client);EXPORT_SYMBOL (unregister_snap_client); -static char snap_err_msg[]__initdata = +static const char snap_err_msg[]__initconst =KERN_CRIT "SNAP - unable to register with 802.2\n" ;static int __init snap_init (void ) { snap_sap =llc_sap_open (0xAA , snap_rcv); - -if (!snap_sap) +if (!snap_sap) {printk (snap_err_msg); +return -EBUSY ; + }return 0 ; } --
Em Fri, Feb 20, 2009 at 10:02:06AM -0800, Stephen Hemminger escreveu:
Quoted 3 lines
Mark some strings as const.
Signed-off-by Stephen Hemminger <[email protected]>
Thanks,
Quoted 19 lines
net/llc/af_llc.c +3
-4@@ -1118,11 +1118,11 @@ static const struct proto_ops llc_ui_ops .sendpage = sock_no_sendpage, }; -static char llc_proc_err_msg[]__initdata = +static const char llc_proc_err_msg[]__initconst =KERN_CRIT "LLC: Unable to register the proc_fs entries\n" ; -static char llc_sysctl_err_msg[]__initdata = +static const char llc_sysctl_err_msg[]__initconst =KERN_CRIT "LLC: Unable to register the sysctl entries\n" ; -static char llc_sock_err_msg[]__initdata = +static const char llc_sock_err_msg[]__initconst =KERN_CRIT "LLC: Unable to register the network family\n" ;static int __init llc2_init (void ) --
From: Arnaldo Carvalho de Melo <[email protected]>
Date: Fri, 20 Feb 2009 18:37:22 -0300
Quoted 8 lines
Em Fri, Feb 20, 2009 at 10:02:06AM -0800, Stephen Hemminger escreveu:
Quoted 3 lines
Mark some strings as const.
Signed-off-by Stephen Hemminger <[email protected]>Thanks,
Applied.
David Miller
maintainerRe: [PATCH 2/2] snap: handle registration error and compile warning
In reply to Arnaldo Carvalho de MeloFrom: Arnaldo Carvalho de Melo <[email protected]>
Date: Fri, 20 Feb 2009 18:37:35 -0300
Quoted 5 lines
Em Fri, Feb 20, 2009 at 10:03:02AM -0800, Stephen Hemminger escreveu:
Quoted 4 lines
If this module can't load, it is almost certainly because something else is already bound to that SAP. So in that case, return the same error code as other SAP usage, and fail the module load.
Quoted 7 lines
Quoted 3 lines
Also fixes a compiler warning about printk of non const.
Signed-off-by Stephen Hemminger <[email protected]>Thanks,
Also applied, thanks.