From: Aya Mahfouz Date: Wed, 4 Mar 2015 06:56:45 +0000 (+0200) Subject: staging: rtl8188eu: replace memset(x,0,ETH_ALEN) X-Git-Tag: omap-for-v4.2/o2_dc~155^2~138^2~621 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e5d9433412d34f02a83edd265605bfe6c347a0a;p=pandora-kernel.git staging: rtl8188eu: replace memset(x,0,ETH_ALEN) eth_zero_addr() is a wrapper function for memset if 0 is going to be assigned to a mac address. The aforementioned function replaces memset. In addition, linux/etherdevice.h was included as a header since it is the file that define the inline function eth_zero_addr(). The changes were carried out using the following coccinelle script: @header@ @@ #include @eth_zero_addr@ expression e; @@ -memset(e,0,ETH_ALEN); +eth_zero_addr(e); @eth_broadcast_addr@ identifier e; @@ -memset(e,\(0xff\|0xFF\|255\),ETH_ALEN); +eth_broadcast_addr(e); @linux_header depends on !header && (eth_zero_addr || eth_broadcast_addr) @ @@ + #include + @special_header depends on !header && !linux_header && (eth_zero_addr || eth_broadcast_addr) @ @@ + + #include + @custom_header depends on !header && !linux_header && !special_header && (eth_zero_addr || eth_broadcast_addr) @ @@ + + #include Signed-off-by: Aya Mahfouz Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed