Staging: w35und: remove memcpy/memcmp wrappers
authorPekka Enberg <penberg@cs.helsinki.fi>
Wed, 29 Oct 2008 18:10:55 +0000 (20:10 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Jan 2009 21:51:45 +0000 (13:51 -0800)
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 <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/winbond/linux/common.h
drivers/staging/winbond/wblinux.c

index 925e1b6cbc4f9f286270676715bccb2068b704d1..046dab6b7bff6b0a837cb5bb59227e0ae7a87793 100644 (file)
@@ -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
 
index 87b9970883d8cc7657b780880020aa06bd45cf14..a662dde8e411a7598eec885eba7dd8702746a384 100644 (file)
@@ -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