aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2015-03-02 22:54:50 -0500
committerDavid S. Miller <davem@davemloft.net>2015-03-03 17:01:37 -0500
commit1667c942e72346df1f41d4171de5a647b6b22dfc (patch)
tree48365e7fc053ba4ab99d5d116ad1cfe01d2984dc
parent93803b3385c653bc6fd391c0de00ef811b3dadc0 (diff)
netconsole: Use eth_<foo>_addr instead of memset
Use the built-in function instead of memset. Miscellanea: Add #include <linux/etherdevice.h> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/netconsole.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index ba2f5e710af1..15731d1db918 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -47,6 +47,7 @@
47#include <linux/netpoll.h> 47#include <linux/netpoll.h>
48#include <linux/inet.h> 48#include <linux/inet.h>
49#include <linux/configfs.h> 49#include <linux/configfs.h>
50#include <linux/etherdevice.h>
50 51
51MODULE_AUTHOR("Maintainer: Matt Mackall <mpm@selenic.com>"); 52MODULE_AUTHOR("Maintainer: Matt Mackall <mpm@selenic.com>");
52MODULE_DESCRIPTION("Console driver for network interfaces"); 53MODULE_DESCRIPTION("Console driver for network interfaces");
@@ -185,7 +186,7 @@ static struct netconsole_target *alloc_param_target(char *target_config)
185 nt->np.local_port = 6665; 186 nt->np.local_port = 6665;
186 nt->np.remote_port = 6666; 187 nt->np.remote_port = 6666;
187 mutex_init(&nt->mutex); 188 mutex_init(&nt->mutex);
188 memset(nt->np.remote_mac, 0xff, ETH_ALEN); 189 eth_broadcast_addr(nt->np.remote_mac);
189 190
190 /* Parse parameters and setup netpoll */ 191 /* Parse parameters and setup netpoll */
191 err = netpoll_parse_options(&nt->np, target_config); 192 err = netpoll_parse_options(&nt->np, target_config);
@@ -604,7 +605,7 @@ static struct config_item *make_netconsole_target(struct config_group *group,
604 nt->np.local_port = 6665; 605 nt->np.local_port = 6665;
605 nt->np.remote_port = 6666; 606 nt->np.remote_port = 6666;
606 mutex_init(&nt->mutex); 607 mutex_init(&nt->mutex);
607 memset(nt->np.remote_mac, 0xff, ETH_ALEN); 608 eth_broadcast_addr(nt->np.remote_mac);
608 609
609 /* Initialize the config_item member */ 610 /* Initialize the config_item member */
610 config_item_init_type_name(&nt->item, name, &netconsole_target_type); 611 config_item_init_type_name(&nt->item, name, &netconsole_target_type);