Skip to content

Commit

Permalink
net: bnxt: Remove Comparison to bool in bnxt_ethtool.c
Browse files Browse the repository at this point in the history
Fix the following coccicheck warning:

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:1991:5-46: WARNING:
Comparison to bool
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:1993:10-54: WARNING:
Comparison to bool
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2380:5-38: WARNING:
Comparison to bool

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jason Yan authored and David S. Miller committed May 5, 2020
1 parent ec16111 commit ba42580
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2095,9 +2095,9 @@ static int bnxt_flash_firmware_from_file(struct net_device *dev,
rc, filename);
return rc;
}
if (bnxt_dir_type_is_ape_bin_format(dir_type) == true)
if (bnxt_dir_type_is_ape_bin_format(dir_type))
rc = bnxt_flash_firmware(dev, dir_type, fw->data, fw->size);
else if (bnxt_dir_type_is_other_exec_format(dir_type) == true)
else if (bnxt_dir_type_is_other_exec_format(dir_type))
rc = bnxt_flash_microcode(dev, dir_type, fw->data, fw->size);
else
rc = bnxt_flash_nvram(dev, dir_type, BNX_DIR_ORDINAL_FIRST,
Expand Down Expand Up @@ -2484,7 +2484,7 @@ static int bnxt_set_eeprom(struct net_device *dev,
}

/* Create or re-write an NVM item: */
if (bnxt_dir_type_is_executable(type) == true)
if (bnxt_dir_type_is_executable(type))
return -EOPNOTSUPP;
ext = eeprom->magic & 0xffff;
ordinal = eeprom->offset >> 16;
Expand Down

0 comments on commit ba42580

Please sign in to comment.