From eb33ae248682ecfdf44d693c72bc4f523f2fb6e3 Mon Sep 17 00:00:00 2001 From: Hannes Eder Date: Sat, 14 Feb 2009 11:33:21 +0000 Subject: 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 Signed-off-by: David S. Miller --- drivers/net/hamradio/mkiss.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers/net/hamradio/mkiss.c') diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c index ed5b37d43334..032c0db4c410 100644 --- a/drivers/net/hamradio/mkiss.c +++ b/drivers/net/hamradio/mkiss.c @@ -976,9 +976,9 @@ static struct tty_ldisc_ops ax_ldisc = { .write_wakeup = mkiss_write_wakeup }; -static char banner[] __initdata = KERN_INFO \ +static const char banner[] __initdata = KERN_INFO \ "mkiss: AX.25 Multikiss, Hans Albas PE1AYX\n"; -static char msg_regfail[] __initdata = KERN_ERR \ +static const char msg_regfail[] __initdata = KERN_ERR \ "mkiss: can't register line discipline (err = %d)\n"; static int __init mkiss_init_driver(void) @@ -987,8 +987,9 @@ static int __init mkiss_init_driver(void) printk(banner); - if ((status = tty_register_ldisc(N_AX25, &ax_ldisc)) != 0) - printk(msg_regfail); + status = tty_register_ldisc(N_AX25, &ax_ldisc); + if (status != 0) + printk(msg_regfail, status); return status; } -- cgit v1.2.1