Skip to content

Commit 7ff4f06

Browse files
JasonYanHwdavem330
authored andcommitted
i40e: Remove unneeded conversion to bool
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e9a9e51 commit 7ff4f06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,7 @@ static int i40e_config_rss_aq(struct i40e_vsi *vsi, const u8 *seed,
16111611
}
16121612
}
16131613
if (lut) {
1614-
bool pf_lut = vsi->type == I40E_VSI_MAIN ? true : false;
1614+
bool pf_lut = vsi->type == I40E_VSI_MAIN;
16151615

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

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

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

0 commit comments

Comments
 (0)