From: Vaishali Thakkar Date: Fri, 26 Jun 2015 04:24:00 +0000 (+0530) Subject: Staging: rtl8192u: Replace memset with eth_zero_addr X-Git-Tag: v4.3-rc1~158^2~642 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=7ee8095bfe1d61ab4a59f5eff14d833ff90c0b38;p=linux.git Staging: rtl8192u: 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. Note that the 6 in the third argument of memset appears to represent an ethernet address size (ETH_ALEN). The Coccinelle semantic patch that makes this change is as follows: // @eth_zero_addr@ expression e; @@ -memset(e,0x00,6); +eth_zero_addr(e); // Signed-off-by: Vaishali Thakkar Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c index ea92fdebe5a7..b89105dbcbba 100644 --- a/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c @@ -112,7 +112,7 @@ static void TsAddBaProcess(unsigned long data) static void ResetTsCommonInfo(PTS_COMMON_INFO pTsCommonInfo) { - memset(pTsCommonInfo->Addr, 0, 6); + eth_zero_addr(pTsCommonInfo->Addr); memset(&pTsCommonInfo->TSpec, 0, sizeof(TSPEC_BODY)); memset(&pTsCommonInfo->TClass, 0, sizeof(QOS_TCLAS)*TCLAS_NUM); pTsCommonInfo->TClasProc = 0;