Commit 66b63a60 authored by Jason Yan's avatar Jason Yan Committed by David S. Miller

bnx2x: Remove Comparison to bool in bnx2x_dcb.c

Fix the following coccicheck warning:

drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c:1548:17-31: WARNING:
Comparison to bool
drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c:1148:16-24: WARNING:
Comparison to bool
drivers/net/ethernet/broadcom/bnx2x/bnx2x_dcb.c:1158:30-38: WARNING:
Comparison to bool
Signed-off-by: default avatarJason Yan <yanaijie@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d9a1c584
...@@ -1145,7 +1145,7 @@ static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp, ...@@ -1145,7 +1145,7 @@ static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp,
break; break;
} }
} }
if (false == pg_found) { if (!pg_found) {
data[help_data->num_of_pg].pg = add_pg; data[help_data->num_of_pg].pg = add_pg;
data[help_data->num_of_pg].pg_priority = data[help_data->num_of_pg].pg_priority =
(1 << ttp[add_traf_type]); (1 << ttp[add_traf_type]);
...@@ -1155,7 +1155,7 @@ static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp, ...@@ -1155,7 +1155,7 @@ static void bnx2x_dcbx_get_num_pg_traf_type(struct bnx2x *bp,
} }
DP(BNX2X_MSG_DCB, DP(BNX2X_MSG_DCB,
"add_traf_type %d pg_found %s num_of_pg %d\n", "add_traf_type %d pg_found %s num_of_pg %d\n",
add_traf_type, (false == pg_found) ? "NO" : "YES", add_traf_type, !pg_found ? "NO" : "YES",
help_data->num_of_pg); help_data->num_of_pg);
} }
} }
...@@ -1544,8 +1544,7 @@ static void bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params( ...@@ -1544,8 +1544,7 @@ static void bnx2x_dcbx_2cos_limit_cee_three_pg_to_cos_params(
if (pg_entry < DCBX_MAX_NUM_PG_BW_ENTRIES) { if (pg_entry < DCBX_MAX_NUM_PG_BW_ENTRIES) {
entry = 0; entry = 0;
if (i == (num_of_pri-1) && if (i == (num_of_pri-1) && !b_found_strict)
false == b_found_strict)
/* last entry will be handled separately /* last entry will be handled separately
* If no priority is strict than last * If no priority is strict than last
* entry goes to last queue. * entry goes to last queue.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment