From 65d9b8b19dd21eeff8c051484b9e972e0b932ff2 Mon Sep 17 00:00:00 2001 From: Hannes Eder Date: Sat, 14 Feb 2009 11:46:59 +0000 Subject: drivers/net/tulip: fix warning: format not a string literal and no ... Impact: Use 'static const char[]' instead of 'static char[]' and while being at it add a KERN_INFO prefix. Fix this warning: drivers/net/tulip/de4x5.c: In function 'de4x5_hw_init': drivers/net/tulip/de4x5.c:1268: warning: format not a string literal and no format arguments drivers/net/tulip/winbond-840.c: In function 'w840_init': drivers/net/tulip/winbond-840.c:1666: warning: format not a string literal and no format arguments Signed-off-by: Hannes Eder Signed-off-by: David S. Miller --- drivers/net/tulip/winbond-840.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/tulip/winbond-840.c') diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index f467bf87817..426b7c73e36 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c @@ -139,7 +139,7 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; #define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer.*/ /* These identify the driver base version and may not be removed. */ -static char version[] = +static const char version[] __initdata = KERN_INFO DRV_NAME ".c:v" DRV_VERSION " (2.4 port) " DRV_RELDATE " Donald Becker \n" KERN_INFO " http://www.scyld.com/network/drivers.html\n"; -- cgit v1.2.3-70-g09d2 From 03f54b3dec072d92393c1fb7eaab62e615161833 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 26 Feb 2009 10:19:22 +0000 Subject: tulip: get rid of warning for non-const string literal Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller --- drivers/net/tulip/de4x5.c | 2 +- drivers/net/tulip/dmfe.c | 2 +- drivers/net/tulip/uli526x.c | 2 +- drivers/net/tulip/winbond-840.c | 7 ++++--- 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'drivers/net/tulip/winbond-840.c') diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 6430a2ec6db..f9491bd787d 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c @@ -479,7 +479,7 @@ #include "de4x5.h" -static const char version[] __devinitdata = +static const char version[] __devinitconst = KERN_INFO "de4x5.c:V0.546 2001/02/22 davies@maniac.ultranet.com\n"; #define c_char const char diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index 2e5c99941f3..e2c9d0f5a75 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c @@ -288,7 +288,7 @@ enum dmfe_CR6_bits { /* Global variable declaration ----------------------------- */ static int __devinitdata printed_version; -static char version[] __devinitdata = +static const char version[] __devinitconst = KERN_INFO DRV_NAME ": Davicom DM9xxx net driver, version " DRV_VERSION " (" DRV_RELDATE ")\n"; diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c index 030e02e6302..c227db07962 100644 --- a/drivers/net/tulip/uli526x.c +++ b/drivers/net/tulip/uli526x.c @@ -200,7 +200,7 @@ enum uli526x_CR6_bits { /* Global variable declaration ----------------------------- */ static int __devinitdata printed_version; -static char version[] __devinitdata = +static const char version[] __devinitconst = KERN_INFO DRV_NAME ": ULi M5261/M5263 net driver, version " DRV_VERSION " (" DRV_RELDATE ")\n"; diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index 426b7c73e36..c61a01b029a 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c @@ -139,9 +139,10 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1}; #define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer.*/ /* These identify the driver base version and may not be removed. */ -static const char version[] __initdata = -KERN_INFO DRV_NAME ".c:v" DRV_VERSION " (2.4 port) " DRV_RELDATE " Donald Becker \n" -KERN_INFO " http://www.scyld.com/network/drivers.html\n"; +static const char version[] __initconst = + KERN_INFO DRV_NAME ".c:v" DRV_VERSION " (2.4 port) " + DRV_RELDATE " Donald Becker \n" + KERN_INFO " http://www.scyld.com/network/drivers.html\n"; MODULE_AUTHOR("Donald Becker "); MODULE_DESCRIPTION("Winbond W89c840 Ethernet driver"); -- cgit v1.2.3-70-g09d2