Skip to content

Commit

Permalink
drivers/net/tulip: fix warning: format not a string literal and no ...
Browse files Browse the repository at this point in the history
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 <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hannes Eder authored and David S. Miller committed Feb 18, 2009
1 parent 05076c1 commit 65d9b8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion drivers/net/tulip/de4x5.c
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,8 @@

#include "de4x5.h"

static char version[] __devinitdata = "de4x5.c:V0.546 2001/02/22 davies@maniac.ultranet.com\n";
static const char version[] __devinitdata =
KERN_INFO "de4x5.c:V0.546 2001/02/22 davies@maniac.ultranet.com\n";

#define c_char const char

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/tulip/winbond-840.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <becker@scyld.com>\n"
KERN_INFO " http://www.scyld.com/network/drivers.html\n";

Expand Down

0 comments on commit 65d9b8b

Please sign in to comment.