public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Mc Guire <der.herr@hofr.at>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: RFC if==else in halbtc8723b1ant.c
Date: Sun, 30 Oct 2016 11:03:12 +0000	[thread overview]
Message-ID: <20161030110312.GA26326@osadl.at> (raw)


Hi !

 in your commit f5b586909581 ("rtlwifi: btcoexist: Modify driver to support 
 BT coexistence in rtl8723be") you introduced a if/else where both branches 
 are the same but the comment in the else branch suggests that this might be
 unintended.

 from code review only I can´t say what the intent is.

/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c:halbtc8723b1ant_action_wifi_connected_bt_acl_busy()

1838                 if ((bt_rssi_state == BTC_RSSI_STATE_HIGH) ||
1839                     (bt_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
1840                         halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC,
1841                                                 true, 14);
1842                         coex_dm->auto_tdma_adjust = false;
1843                 } else { /*for low BT RSSI*/
1844                         halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC,
1845                                                 true, 14);
1846                         coex_dm->auto_tdma_adjust = false;
1847                 }

  basically the same construct is also in 
 halbtc8723b1ant_run_coexist_mechanism()

2213                         if ((wifi_rssi_state == BTC_RSSI_STATE_HIGH) ||
2214                             (wifi_rssi_state == BTC_RSSI_STATE_STAY_HIGH)) {
2215                                 halbtc8723b1ant_limited_tx(btcoexist,
2216                                                            NORMAL_EXEC,
2217                                                            1, 1, 1, 1);
2218                         } else {
2219                                 halbtc8723b1ant_limited_tx(btcoexist,
2220                                                            NORMAL_EXEC,
2221                                                            1, 1, 1, 1);
2222                         }

 where the if condition is the same so the else may also only apply to the
 low BT RSSI - and the if and else are again the same - if this is intended
 or not is not clear. If this is intended it should have appropriate comments.

thx!
hofrat

                 reply	other threads:[~2016-10-30 11:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161030110312.GA26326@osadl.at \
    --to=der.herr@hofr.at \
    --cc=Larry.Finger@lwfinger.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox