ixgbe: using is_zero_ether_addr() to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Sun, 26 Aug 2012 16:59:37 +0000 (16:59 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 23 Oct 2012 04:16:26 +0000 (21:16 -0700)
Using is_zero_ether_addr() to simplify the code.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_common.c

index dbf37e4a45fda722df461cc11eaaf8b2bd0449f8..a2a9bcca491546eeb90e9102b69151ddcf54ce0c 100644 (file)
@@ -1778,8 +1778,7 @@ s32 ixgbe_validate_mac_addr(u8 *mac_addr)
        else if (IXGBE_IS_BROADCAST(mac_addr))
                status = IXGBE_ERR_INVALID_MAC_ADDR;
        /* Reject the zero address */
-       else if (mac_addr[0] == 0 && mac_addr[1] == 0 && mac_addr[2] == 0 &&
-                mac_addr[3] == 0 && mac_addr[4] == 0 && mac_addr[5] == 0)
+       else if (is_zero_ether_addr(mac_addr))
                status = IXGBE_ERR_INVALID_MAC_ADDR;
 
        return status;