Message ID | 20200918102505.16036-8-zhengbin13@huawei.com |
---|---|
State | New |
Headers | show |
Series | None | expand |
On 9/18/20 5:25 AM, Zheng Bin wrote: > Fixes coccicheck warning: > > drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:616:14-20: WARNING: Comparison to bool > drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:621:13-19: WARNING: Comparison to bool > drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:626:14-20: WARNING: Comparison to bool > drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:631:13-19: WARNING: Comparison to bool > > Signed-off-by: Zheng Bin <zhengbin13@huawei.com> > --- > drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Larry > > diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c > index d4cd186036fd..bb5a0c4aec93 100644 > --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c > +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c > @@ -613,22 +613,22 @@ static bool _rtl92ce_llt_table_init(struct ieee80211_hw *hw) > > for (i = 0; i < (txpktbuf_bndy - 1); i++) { > status = _rtl92ce_llt_write(hw, i, i + 1); > - if (true != status) > + if (!status) > return status; > } > > status = _rtl92ce_llt_write(hw, (txpktbuf_bndy - 1), 0xFF); > - if (true != status) > + if (!status) > return status; > > for (i = txpktbuf_bndy; i < maxpage; i++) { > status = _rtl92ce_llt_write(hw, i, (i + 1)); > - if (true != status) > + if (!status) > return status; > } > > status = _rtl92ce_llt_write(hw, maxpage, txpktbuf_bndy); > - if (true != status) > + if (!status) > return status; > > return true; > -- > 2.26.0.106.g9fadedd >
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c index d4cd186036fd..bb5a0c4aec93 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c @@ -613,22 +613,22 @@ static bool _rtl92ce_llt_table_init(struct ieee80211_hw *hw) for (i = 0; i < (txpktbuf_bndy - 1); i++) { status = _rtl92ce_llt_write(hw, i, i + 1); - if (true != status) + if (!status) return status; } status = _rtl92ce_llt_write(hw, (txpktbuf_bndy - 1), 0xFF); - if (true != status) + if (!status) return status; for (i = txpktbuf_bndy; i < maxpage; i++) { status = _rtl92ce_llt_write(hw, i, (i + 1)); - if (true != status) + if (!status) return status; } status = _rtl92ce_llt_write(hw, maxpage, txpktbuf_bndy); - if (true != status) + if (!status) return status; return true;
Fixes coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:616:14-20: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:621:13-19: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:626:14-20: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c:631:13-19: WARNING: Comparison to bool Signed-off-by: Zheng Bin <zhengbin13@huawei.com> --- drivers/net/wireless/realtek/rtlwifi/rtl8192ce/hw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.26.0.106.g9fadedd