Message ID | 20200420042720.18815-1-yanaijie@huawei.com |
---|---|
State | Accepted |
Delegated to: | David Miller |
Headers | show |
Series | qed: use true,false for bool variables | expand |
> From: Jason Yan <yanaijie@huawei.com> > Sent: Monday, April 20, 2020 7:27 AM > > ---------------------------------------------------------------------- > Fix the following coccicheck warning: > > drivers/net/ethernet/qlogic/qed/qed_dev.c:4395:2-34: WARNING: > Assignment of 0/1 to bool variable > drivers/net/ethernet/qlogic/qed/qed_dev.c:1975:2-34: WARNING: > Assignment of 0/1 to bool variable > > Signed-off-by: Jason Yan <yanaijie@huawei.com> > --- > drivers/net/ethernet/qlogic/qed/qed_dev.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c > b/drivers/net/ethernet/qlogic/qed/qed_dev.c > index 38a65b984e47..7119a18af19e 100644 > --- a/drivers/net/ethernet/qlogic/qed/qed_dev.c > +++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c > @@ -1972,7 +1972,7 @@ static int qed_init_qm_sanity(struct qed_hwfn > *p_hwfn) > return 0; > > if (QED_IS_ROCE_PERSONALITY(p_hwfn)) { > - p_hwfn->hw_info.multi_tc_roce_en = 0; > + p_hwfn->hw_info.multi_tc_roce_en = false; > DP_NOTICE(p_hwfn, > "multi-tc roce was disabled to reduce requested > amount of pqs\n"); > if (qed_init_qm_get_num_pqs(p_hwfn) <= > RESC_NUM(p_hwfn, QED_PQ)) @@ -4392,7 +4392,7 @@ > qed_get_hw_info(struct qed_hwfn *p_hwfn, > } > > if (QED_IS_ROCE_PERSONALITY(p_hwfn)) > - p_hwfn->hw_info.multi_tc_roce_en = 1; > + p_hwfn->hw_info.multi_tc_roce_en = true; > > p_hwfn->hw_info.num_hw_tc = NUM_PHYS_TCS_4PORT_K2; > p_hwfn->hw_info.num_active_tc = 1; > -- > 2.21.1 Thanks, Acked-by: Michal Kalderon <michal.kalderon@marvell.com>
From: Jason Yan <yanaijie@huawei.com> Date: Mon, 20 Apr 2020 12:27:20 +0800 > Fix the following coccicheck warning: > > drivers/net/ethernet/qlogic/qed/qed_dev.c:4395:2-34: WARNING: > Assignment of 0/1 to bool variable > drivers/net/ethernet/qlogic/qed/qed_dev.c:1975:2-34: WARNING: > Assignment of 0/1 to bool variable > > Signed-off-by: Jason Yan <yanaijie@huawei.com> Applied to net-next, thanks.
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c b/drivers/net/ethernet/qlogic/qed/qed_dev.c index 38a65b984e47..7119a18af19e 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_dev.c +++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c @@ -1972,7 +1972,7 @@ static int qed_init_qm_sanity(struct qed_hwfn *p_hwfn) return 0; if (QED_IS_ROCE_PERSONALITY(p_hwfn)) { - p_hwfn->hw_info.multi_tc_roce_en = 0; + p_hwfn->hw_info.multi_tc_roce_en = false; DP_NOTICE(p_hwfn, "multi-tc roce was disabled to reduce requested amount of pqs\n"); if (qed_init_qm_get_num_pqs(p_hwfn) <= RESC_NUM(p_hwfn, QED_PQ)) @@ -4392,7 +4392,7 @@ qed_get_hw_info(struct qed_hwfn *p_hwfn, } if (QED_IS_ROCE_PERSONALITY(p_hwfn)) - p_hwfn->hw_info.multi_tc_roce_en = 1; + p_hwfn->hw_info.multi_tc_roce_en = true; p_hwfn->hw_info.num_hw_tc = NUM_PHYS_TCS_4PORT_K2; p_hwfn->hw_info.num_active_tc = 1;
Fix the following coccicheck warning: drivers/net/ethernet/qlogic/qed/qed_dev.c:4395:2-34: WARNING: Assignment of 0/1 to bool variable drivers/net/ethernet/qlogic/qed/qed_dev.c:1975:2-34: WARNING: Assignment of 0/1 to bool variable Signed-off-by: Jason Yan <yanaijie@huawei.com> --- drivers/net/ethernet/qlogic/qed/qed_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)