diff options
author | Joe Perches <joe@perches.com> | 2012-02-09 11:17:23 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-13 00:47:40 -0500 |
commit | 23677ce3172fcb93522a1df077d21019e73ee1e3 (patch) | |
tree | 9558b9c1f24d03d612f4bae999d453ae7ec637d6 /drivers/net/ethernet/intel/ixgb | |
parent | 1a0d6ae5795c376bae6d012fb25e8341e4c6d5f2 (diff) |
drivers/net: Remove boolean comparisons to true/false
Booleans should not be compared to true or false
but be directly tested or tested with !.
Done via cocci script:
@@
bool t;
@@
- t == true
+ t
@@
bool t;
@@
- t != true
+ !t
@@
bool t;
@@
- t == false
+ !t
@@
bool t;
@@
- t != false
+ t
Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgb')
-rw-r--r-- | drivers/net/ethernet/intel/ixgb/ixgb_ee.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_ee.c b/drivers/net/ethernet/intel/ixgb/ixgb_ee.c index 2ed925f38811..eca216b9b859 100644 --- a/drivers/net/ethernet/intel/ixgb/ixgb_ee.c +++ b/drivers/net/ethernet/intel/ixgb/ixgb_ee.c @@ -533,10 +533,8 @@ __le16 ixgb_get_eeprom_word(struct ixgb_hw *hw, u16 index) { - if ((index < IXGB_EEPROM_SIZE) && - (ixgb_check_and_get_eeprom_data(hw) == true)) { - return hw->eeprom[index]; - } + if (index < IXGB_EEPROM_SIZE && ixgb_check_and_get_eeprom_data(hw)) + return hw->eeprom[index]; return 0; } @@ -558,7 +556,7 @@ ixgb_get_ee_mac_addr(struct ixgb_hw *hw, ENTER(); - if (ixgb_check_and_get_eeprom_data(hw) == true) { + if (ixgb_check_and_get_eeprom_data(hw)) { for (i = 0; i < ETH_ALEN; i++) { mac_addr[i] = ee_map->mac_addr[i]; } @@ -578,7 +576,7 @@ ixgb_get_ee_mac_addr(struct ixgb_hw *hw, u32 ixgb_get_ee_pba_number(struct ixgb_hw *hw) { - if (ixgb_check_and_get_eeprom_data(hw) == true) + if (ixgb_check_and_get_eeprom_data(hw)) return le16_to_cpu(hw->eeprom[EEPROM_PBA_1_2_REG]) | (le16_to_cpu(hw->eeprom[EEPROM_PBA_3_4_REG])<<16); @@ -599,7 +597,7 @@ ixgb_get_ee_device_id(struct ixgb_hw *hw) { struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom; - if (ixgb_check_and_get_eeprom_data(hw) == true) + if (ixgb_check_and_get_eeprom_data(hw)) return le16_to_cpu(ee_map->device_id); return 0; |