diff mbox

net: fix warning about non-const string

Message ID 20090309165155.187776c0@nehalam
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

stephen hemminger March 9, 2009, 11:51 p.m. UTC
Since dev_set_name takes a printf style string, new gcc complains
if arg is not const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/net/core/net-sysfs.c	2009-03-09 08:23:45.573308957 -0700
+++ b/net/core/net-sysfs.c	2009-03-09 16:47:46.640356108 -0700
@@ -498,7 +498,7 @@  int netdev_register_kobject(struct net_d
 	dev->groups = groups;
 
 	BUILD_BUG_ON(BUS_ID_SIZE < IFNAMSIZ);
-	dev_set_name(dev, net->name);
+	dev_set_name(dev, "%s", net->name);
 
 #ifdef CONFIG_SYSFS
 	*groups++ = &netstat_group;