diff options
author | Hannes Eder <hannes@hanneseder.net> | 2009-02-14 06:33:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-17 20:26:11 -0500 |
commit | eb33ae248682ecfdf44d693c72bc4f523f2fb6e3 (patch) | |
tree | 63bc93471541b8565a9b159b6d724ff1054b52ed /drivers/net/hamradio | |
parent | f6370117958d67608225d5e3b55e3ad2080640e8 (diff) |
drivers/net/hamradio: fix warning: format not a string literal and no ...
Impact: Use 'static const char[]' instead of 'static char[]' and while
being at it fix an issue in 'mkiss_init_driver', where in case of an
error the status code was not passed to printk.
Fix this warnings:
drivers/net/hamradio/6pack.c: In function 'sixpack_init_driver':
drivers/net/hamradio/6pack.c:802: warning: format not a string literal and no format arguments
drivers/net/hamradio/bpqether.c: In function 'bpq_init_driver':
drivers/net/hamradio/bpqether.c:609: warning: format not a string literal and no format arguments
drivers/net/hamradio/mkiss.c: In function 'mkiss_init_driver':
drivers/net/hamradio/mkiss.c:988: warning: format not a string literal and no format arguments
drivers/net/hamradio/mkiss.c:991: warning: format not a string literal and no format arguments
drivers/net/hamradio/scc.c: In function 'scc_init_driver':
drivers/net/hamradio/scc.c:2109: warning: format not a string literal and no format arguments
drivers/net/hamradio/yam.c: In function 'yam_init_driver':
drivers/net/hamradio/yam.c:1094: warning: format not a string literal and no format arguments
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hamradio')
-rw-r--r-- | drivers/net/hamradio/6pack.c | 4 | ||||
-rw-r--r-- | drivers/net/hamradio/bpqether.c | 3 | ||||
-rw-r--r-- | drivers/net/hamradio/mkiss.c | 9 | ||||
-rw-r--r-- | drivers/net/hamradio/scc.c | 3 | ||||
-rw-r--r-- | drivers/net/hamradio/yam.c | 3 |
5 files changed, 13 insertions, 9 deletions
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index 3da9f394b4c..155160052c8 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c | |||
@@ -790,9 +790,9 @@ static struct tty_ldisc_ops sp_ldisc = { | |||
790 | 790 | ||
791 | /* Initialize 6pack control device -- register 6pack line discipline */ | 791 | /* Initialize 6pack control device -- register 6pack line discipline */ |
792 | 792 | ||
793 | static char msg_banner[] __initdata = KERN_INFO \ | 793 | static const char msg_banner[] __initdata = KERN_INFO \ |
794 | "AX.25: 6pack driver, " SIXPACK_VERSION "\n"; | 794 | "AX.25: 6pack driver, " SIXPACK_VERSION "\n"; |
795 | static char msg_regfail[] __initdata = KERN_ERR \ | 795 | static const char msg_regfail[] __initdata = KERN_ERR \ |
796 | "6pack: can't register line discipline (err = %d)\n"; | 796 | "6pack: can't register line discipline (err = %d)\n"; |
797 | 797 | ||
798 | static int __init sixpack_init_driver(void) | 798 | static int __init sixpack_init_driver(void) |
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c index 2c619bc99ae..723e9c11f1a 100644 --- a/drivers/net/hamradio/bpqether.c +++ b/drivers/net/hamradio/bpqether.c | |||
@@ -87,7 +87,8 @@ | |||
87 | 87 | ||
88 | #include <linux/bpqether.h> | 88 | #include <linux/bpqether.h> |
89 | 89 | ||
90 | static char banner[] __initdata = KERN_INFO "AX.25: bpqether driver version 004\n"; | 90 | static const char banner[] __initdata = KERN_INFO \ |
91 | "AX.25: bpqether driver version 004\n"; | ||
91 | 92 | ||
92 | static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; | 93 | static char bcast_addr[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; |
93 | 94 | ||
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index ed5b37d4333..032c0db4c41 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c | |||
@@ -976,9 +976,9 @@ static struct tty_ldisc_ops ax_ldisc = { | |||
976 | .write_wakeup = mkiss_write_wakeup | 976 | .write_wakeup = mkiss_write_wakeup |
977 | }; | 977 | }; |
978 | 978 | ||
979 | static char banner[] __initdata = KERN_INFO \ | 979 | static const char banner[] __initdata = KERN_INFO \ |
980 | "mkiss: AX.25 Multikiss, Hans Albas PE1AYX\n"; | 980 | "mkiss: AX.25 Multikiss, Hans Albas PE1AYX\n"; |
981 | static char msg_regfail[] __initdata = KERN_ERR \ | 981 | static const char msg_regfail[] __initdata = KERN_ERR \ |
982 | "mkiss: can't register line discipline (err = %d)\n"; | 982 | "mkiss: can't register line discipline (err = %d)\n"; |
983 | 983 | ||
984 | static int __init mkiss_init_driver(void) | 984 | static int __init mkiss_init_driver(void) |
@@ -987,8 +987,9 @@ static int __init mkiss_init_driver(void) | |||
987 | 987 | ||
988 | printk(banner); | 988 | printk(banner); |
989 | 989 | ||
990 | if ((status = tty_register_ldisc(N_AX25, &ax_ldisc)) != 0) | 990 | status = tty_register_ldisc(N_AX25, &ax_ldisc); |
991 | printk(msg_regfail); | 991 | if (status != 0) |
992 | printk(msg_regfail, status); | ||
992 | 993 | ||
993 | return status; | 994 | return status; |
994 | } | 995 | } |
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c index 2acb18f0697..d712e7af780 100644 --- a/drivers/net/hamradio/scc.c +++ b/drivers/net/hamradio/scc.c | |||
@@ -184,7 +184,8 @@ | |||
184 | 184 | ||
185 | #include "z8530.h" | 185 | #include "z8530.h" |
186 | 186 | ||
187 | static char banner[] __initdata = KERN_INFO "AX.25: Z8530 SCC driver version "VERSION".dl1bke\n"; | 187 | static const char banner[] __initdata = KERN_INFO \ |
188 | "AX.25: Z8530 SCC driver version "VERSION".dl1bke\n"; | ||
188 | 189 | ||
189 | static void t_dwait(unsigned long); | 190 | static void t_dwait(unsigned long); |
190 | static void t_txdelay(unsigned long); | 191 | static void t_txdelay(unsigned long); |
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c index 82a8be7613d..a54b865c208 100644 --- a/drivers/net/hamradio/yam.c +++ b/drivers/net/hamradio/yam.c | |||
@@ -77,7 +77,8 @@ | |||
77 | /* --------------------------------------------------------------------- */ | 77 | /* --------------------------------------------------------------------- */ |
78 | 78 | ||
79 | static const char yam_drvname[] = "yam"; | 79 | static const char yam_drvname[] = "yam"; |
80 | static char yam_drvinfo[] __initdata = KERN_INFO "YAM driver version 0.8 by F1OAT/F6FBB\n"; | 80 | static const char yam_drvinfo[] __initdata = KERN_INFO \ |
81 | "YAM driver version 0.8 by F1OAT/F6FBB\n"; | ||
81 | 82 | ||
82 | /* --------------------------------------------------------------------- */ | 83 | /* --------------------------------------------------------------------- */ |
83 | 84 | ||