* [PATCH 1/2] llc: fix non-const printk warning
@ 2009-02-20 18:02 Stephen Hemminger
2009-02-20 18:03 ` [PATCH 2/2] snap: handle registration error and compile warning Stephen Hemminger
2009-02-20 21:37 ` [PATCH 1/2] llc: fix non-const printk warning Arnaldo Carvalho de Melo
0 siblings, 2 replies; 6+ messages in thread
From: Stephen Hemminger @ 2009-02-20 18:02 UTC (permalink / raw)
To: David Miller, Arnaldo Carvalho de Melo; +Cc: netdev
Mark some strings as const.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/llc/af_llc.c 2009-02-20 08:34:21.537870609 -0800
+++ b/net/llc/af_llc.c 2009-02-20 08:37:52.920622312 -0800
@@ -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)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] snap: handle registration error and compile warning
2009-02-20 18:02 [PATCH 1/2] llc: fix non-const printk warning Stephen Hemminger
@ 2009-02-20 18:03 ` Stephen Hemminger
2009-02-20 21:37 ` Arnaldo Carvalho de Melo
2009-02-20 21:37 ` [PATCH 1/2] llc: fix non-const printk warning Arnaldo Carvalho de Melo
1 sibling, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2009-02-20 18:03 UTC (permalink / raw)
To: David Miller, Arnaldo Carvalho de Melo; +Cc: netdev
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 <shemminger@vyatta.com>
--- a/net/802/psnap.c 2009-02-20 08:38:04.545372306 -0800
+++ b/net/802/psnap.c 2009-02-20 08:39:16.394961522 -0800
@@ -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;
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] llc: fix non-const printk warning
2009-02-20 18:02 [PATCH 1/2] llc: fix non-const printk warning Stephen Hemminger
2009-02-20 18:03 ` [PATCH 2/2] snap: handle registration error and compile warning Stephen Hemminger
@ 2009-02-20 21:37 ` Arnaldo Carvalho de Melo
2009-02-22 8:02 ` David Miller
1 sibling, 1 reply; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2009-02-20 21:37 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, netdev
Em Fri, Feb 20, 2009 at 10:02:06AM -0800, Stephen Hemminger escreveu:
> Mark some strings as const.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Thanks,
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> --- a/net/llc/af_llc.c 2009-02-20 08:34:21.537870609 -0800
> +++ b/net/llc/af_llc.c 2009-02-20 08:37:52.920622312 -0800
> @@ -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)
> --
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] snap: handle registration error and compile warning
2009-02-20 18:03 ` [PATCH 2/2] snap: handle registration error and compile warning Stephen Hemminger
@ 2009-02-20 21:37 ` Arnaldo Carvalho de Melo
2009-02-22 8:03 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2009-02-20 21:37 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David Miller, netdev
Em Fri, Feb 20, 2009 at 10:03:02AM -0800, Stephen Hemminger escreveu:
> 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 <shemminger@vyatta.com>
Thanks,
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> --- a/net/802/psnap.c 2009-02-20 08:38:04.545372306 -0800
> +++ b/net/802/psnap.c 2009-02-20 08:39:16.394961522 -0800
> @@ -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;
> }
> --
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] llc: fix non-const printk warning
2009-02-20 21:37 ` [PATCH 1/2] llc: fix non-const printk warning Arnaldo Carvalho de Melo
@ 2009-02-22 8:02 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2009-02-22 8:02 UTC (permalink / raw)
To: acme; +Cc: shemminger, netdev
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Fri, 20 Feb 2009 18:37:22 -0300
> Em Fri, Feb 20, 2009 at 10:02:06AM -0800, Stephen Hemminger escreveu:
> > Mark some strings as const.
> >
> > Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
> Thanks,
>
> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] snap: handle registration error and compile warning
2009-02-20 21:37 ` Arnaldo Carvalho de Melo
@ 2009-02-22 8:03 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2009-02-22 8:03 UTC (permalink / raw)
To: acme; +Cc: shemminger, netdev
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Date: Fri, 20 Feb 2009 18:37:35 -0300
> Em Fri, Feb 20, 2009 at 10:03:02AM -0800, Stephen Hemminger escreveu:
> > 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 <shemminger@vyatta.com>
>
> Thanks,
>
> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Also applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-02-22 8:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-20 18:02 [PATCH 1/2] llc: fix non-const printk warning Stephen Hemminger
2009-02-20 18:03 ` [PATCH 2/2] snap: handle registration error and compile warning Stephen Hemminger
2009-02-20 21:37 ` Arnaldo Carvalho de Melo
2009-02-22 8:03 ` David Miller
2009-02-20 21:37 ` [PATCH 1/2] llc: fix non-const printk warning Arnaldo Carvalho de Melo
2009-02-22 8:02 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).