[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <63216.1533591775@turing-police.cc.vt.edu>
Date: Mon, 06 Aug 2018 17:42:55 -0400
From: valdis.kletnieks@...edu
To: YueHaibing <yuehaibing@...wei.com>
Cc: pkshih@...ltek.com, kvalo@...eaurora.org,
Larry.Finger@...inger.net, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org, davem@...emloft.net,
colin.king@...onical.com, linux-wireless@...r.kernel.org
Subject: Re: [PATCH] rtlwifi: btcoex: Fix if == else warnings in halbtc8723b2ant.c
On Mon, 06 Aug 2018 12:54:40 +0800, YueHaibing said:
> Fix following coccinelle warning:
>
> ./drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b2ant.c:2952:2-4: WARNING: possible condition with no effect (if == else)
> /* sw mechanism */
> if (BTC_WIFI_BW_HT40 == wifi_bw) {
> - if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
> - (wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
> - btc8723b2ant_sw_mechanism(btcoexist, true, true,
> - false, false);
> - } else {
> - btc8723b2ant_sw_mechanism(btcoexist, true, true,
> - false, false);
> - }
> + btc8723b2ant_sw_mechanism(btcoexist, true, true,
> + false, false);
> } else {
Rather than blindly fixing this, perhaps a bit of thought needs to be
applied to why this code looks like this in the first place.
See commit c6821613e653a (which looks like the bletcherous "do too many
things at once" commit indeed), although the actual diff appears to be a
"no harm, no foul" against this commit, where the issue already existed.
commit aa45a673b291fd761275493bc15316d79555ed55
Author: Larry Finger <Larry.Finger@...inger.net>
Date: Fri Feb 28 15:16:43 2014 -0600
rtlwifi: btcoexist: Add new mini driver
Larry? Can you reach back to 2014 and remember why this code
looked like this in the first place?
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists