[PATCH] et131x: using is_zero_ether_addr() to simplify the code

From: Wei Yongjun
Date: Sat Aug 25 2012 - 20:55:12 EST


From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>

Using is_zero_ether_addr() to simplify the code

Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
---
drivers/staging/et131x/et131x.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index 029725c..c13499d 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -3955,12 +3955,7 @@ static void et131x_hwaddr_init(struct et131x_adapter *adapter)
* EEPROM then we need to generate the last octet and set it on the
* device
*/
- if (adapter->rom_addr[0] == 0x00 &&
- adapter->rom_addr[1] == 0x00 &&
- adapter->rom_addr[2] == 0x00 &&
- adapter->rom_addr[3] == 0x00 &&
- adapter->rom_addr[4] == 0x00 &&
- adapter->rom_addr[5] == 0x00) {
+ if (is_zero_ether_addr(adapter->rom_addr)) {
/*
* We need to randomly generate the last octet so we
* decrease our chances of setting the mac address to

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/