From: Vaishali Thakkar Date: Sun, 21 Jun 2015 05:26:21 +0000 (+0530) Subject: Staging: wilc1000: Replace memset with eth_zero_addr X-Git-Tag: v4.9.8~3706^2~783 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ca1b55a49f3b8e139fb4567b966f03a734e744f;p=platform%2Fkernel%2Flinux-rpi3.git Staging: wilc1000: Replace memset with eth_zero_addr Use eth_zero_addr to assign the zero address to the given address array instead of memset when second argument is address of zero. The Coccinelle semantic patch that makes this change is as follows: // @eth_zero_addr@ expression e; @@ -memset(e,0x00,ETH_ALEN); +eth_zero_addr(e); // Signed-off-by: Vaishali Thakkar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c index f5296f5..2a3d875 100644 --- a/drivers/staging/wilc1000/linux_mon.c +++ b/drivers/staging/wilc1000/linux_mon.c @@ -495,7 +495,7 @@ static void WILC_WFI_mon_setup(struct net_device *dev) ether_setup(dev); dev->tx_queue_len = 0; dev->type = ARPHRD_IEEE80211_RADIOTAP; - memset(dev->dev_addr, 0, ETH_ALEN); + eth_zero_addr(dev->dev_addr); #ifdef USE_WIRELESS {