From: Pekka Enberg Date: Wed, 29 Oct 2008 18:10:55 +0000 (+0200) Subject: Staging: w35und: remove memcpy/memcmp wrappers X-Git-Tag: v2.6.29-rc1~228^2~211 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=fc68c7efea279b066bd5f7cc7413099a6b22bbec;p=linux-2.6-omap-h63xx.git Staging: w35und: remove memcpy/memcmp wrappers The OS_MEMORY_CLEAR macro is not used so remove it. Also convert the one call-site that uses OS_MEMORY_COMPARE to use memcmp() directly and remove the wrapper macro. Acked-by: Pavel Machek Signed-off-by: Pekka Enberg Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/winbond/linux/common.h b/drivers/staging/winbond/linux/common.h index 925e1b6cbc4..046dab6b7bf 100644 --- a/drivers/staging/winbond/linux/common.h +++ b/drivers/staging/winbond/linux/common.h @@ -73,8 +73,5 @@ #define OS_EVENT_INDICATE( _A, _B, _F ) #define OS_PMKID_STATUS_EVENT( _A ) -#define OS_MEMORY_CLEAR( _A, _S ) memset( (u8 *)_A,0,_S) -#define OS_MEMORY_COMPARE( _A, _B, _S ) (memcmp(_A,_B,_S)? 0 : 1) // Definition is reverse with Ndis 1: the same 0: different - #endif // COMMON_DEF diff --git a/drivers/staging/winbond/wblinux.c b/drivers/staging/winbond/wblinux.c index 87b9970883d..a662dde8e41 100644 --- a/drivers/staging/winbond/wblinux.c +++ b/drivers/staging/winbond/wblinux.c @@ -181,12 +181,11 @@ WbWLanInitialize(struct wb35_adapter *adapter) pMacAddr = adapter->sLocalPara.ThisMacAddress; pMacAddr2 = adapter->sLocalPara.PermanentAddress; hal_get_permanent_address( pHwData, adapter->sLocalPara.PermanentAddress );// Reading ethernet address from EEPROM - if (OS_MEMORY_COMPARE(pMacAddr, "\x00\x00\x00\x00\x00\x00", MAC_ADDR_LENGTH )) // Is equal - { - memcpy( pMacAddr, pMacAddr2, MAC_ADDR_LENGTH ); - } else { + if (memcmp(pMacAddr, "\x00\x00\x00\x00\x00\x00", MAC_ADDR_LENGTH) == 0) + memcpy(pMacAddr, pMacAddr2, MAC_ADDR_LENGTH); + else { // Set the user define MAC address - hal_set_ethernet_address( pHwData, adapter->sLocalPara.ThisMacAddress ); + hal_set_ethernet_address(pHwData, adapter->sLocalPara.ThisMacAddress); } //get current antenna