Skip to content

Commit

Permalink
i40e: Remove unneeded conversion to bool
Browse files Browse the repository at this point in the history
The '==' expression itself is bool, no need to convert it to bool again.
This fixes the following coccicheck warning:

drivers/net/ethernet/intel/i40e/i40e_main.c:1614:52-57: WARNING:
conversion to bool not needed here
drivers/net/ethernet/intel/i40e/i40e_main.c:11439:52-57: WARNING:
conversion to bool not needed here

Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
JasonYanHw authored and davem330 committed Apr 21, 2020
1 parent e9a9e51 commit 7ff4f06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/intel/i40e/i40e_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ static int i40e_config_rss_aq(struct i40e_vsi *vsi, const u8 *seed,
}
}
if (lut) {
bool pf_lut = vsi->type == I40E_VSI_MAIN ? true : false;
bool pf_lut = vsi->type == I40E_VSI_MAIN;

ret = i40e_aq_set_rss_lut(hw, vsi->id, pf_lut, lut, lut_size);
if (ret) {
Expand Down Expand Up @@ -11436,7 +11436,7 @@ static int i40e_get_rss_aq(struct i40e_vsi *vsi, const u8 *seed,
}

if (lut) {
bool pf_lut = vsi->type == I40E_VSI_MAIN ? true : false;
bool pf_lut = vsi->type == I40E_VSI_MAIN;

ret = i40e_aq_get_rss_lut(hw, vsi->id, pf_lut, lut, lut_size);
if (ret) {
Expand Down

0 comments on commit 7ff4f06

Please sign in to comment.