From: Julian Calaby <julian.calaby@gmail.com>
To: Abaci Team <abaci-bugfix@linux.alibaba.com>
Cc: Kalle Valo <kvalo@codeaurora.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
linux-wireless@vger.kernel.org, Lee Jones <lee.jones@linaro.org>,
b43-dev <b43-dev@lists.infradead.org>,
netdev@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] b43: Remove redundant code
Date: Thu, 28 Jan 2021 21:29:14 +1100 [thread overview]
Message-ID: <CAGRGNgWM=dQx4suXZJX+u6m0i4=Qx3hZFZWdWJ8VO+FG_edH2w@mail.gmail.com> (raw)
In-Reply-To: <1611823636-18377-1-git-send-email-abaci-bugfix@linux.alibaba.com>
Hi ..... <insert name here>,
(No proper name in the from field or signed-off-by, as you're already aware)
On Thu, Jan 28, 2021 at 7:53 PM Abaci Team
<abaci-bugfix@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warnings:
>
> ./drivers/net/wireless/broadcom/b43/phy_n.c:4640:2-4: WARNING: possible
> condition with no effect (if == else).
>
> ./drivers/net/wireless/broadcom/b43/phy_n.c:4606:2-4: WARNING: possible
> condition with no effect (if == else).
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Suggested-by: Jiapeng Zhong <oswb@linux.alibaba.com>
> Signed-off-by: Abaci Team <abaci-bugfix@linux.alibaba.com>
> ---
> drivers/net/wireless/broadcom/b43/phy_n.c | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/drivers/net/wireless/broadcom/b43/phy_n.c b/drivers/net/wireless/broadcom/b43/phy_n.c
> index b669dff..39a335f 100644
> --- a/drivers/net/wireless/broadcom/b43/phy_n.c
> +++ b/drivers/net/wireless/broadcom/b43/phy_n.c
> @@ -4601,16 +4601,6 @@ static void b43_nphy_spur_workaround(struct b43_wldev *dev)
> if (nphy->hang_avoid)
> b43_nphy_stay_in_carrier_search(dev, 1);
>
> - if (nphy->gband_spurwar_en) {
> - /* TODO: N PHY Adjust Analog Pfbw (7) */
> - if (channel == 11 && b43_is_40mhz(dev)) {
> - ; /* TODO: N PHY Adjust Min Noise Var(2, tone, noise)*/
> - } else {
> - ; /* TODO: N PHY Adjust Min Noise Var(0, NULL, NULL)*/
> - }
> - /* TODO: N PHY Adjust CRS Min Power (0x1E) */
> - }
I'm not sure how useful this patch is, even though it is technically correct.
The b43 driver was almost entirely reverse engineered from various
sources so there's still a lot of places, like this, where placeholder
comments were written until the actual code that would have been here
was ready / reverse engineered.
That said, I believe the driver works well enough for all it's users
and has not seen any significant changes in a long time.
Thanks,
--
Julian Calaby
Email: julian.calaby at gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
On Thu, Jan 28, 2021 at 7:53 PM Abaci Team
<abaci-bugfix@linux.alibaba.com> wrote:
>
> Fix the following coccicheck warnings:
>
> ./drivers/net/wireless/broadcom/b43/phy_n.c:4640:2-4: WARNING: possible
> condition with no effect (if == else).
>
> ./drivers/net/wireless/broadcom/b43/phy_n.c:4606:2-4: WARNING: possible
> condition with no effect (if == else).
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Suggested-by: Jiapeng Zhong <oswb@linux.alibaba.com>
> Signed-off-by: Abaci Team <abaci-bugfix@linux.alibaba.com>
> ---
> drivers/net/wireless/broadcom/b43/phy_n.c | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/drivers/net/wireless/broadcom/b43/phy_n.c b/drivers/net/wireless/broadcom/b43/phy_n.c
> index b669dff..39a335f 100644
> --- a/drivers/net/wireless/broadcom/b43/phy_n.c
> +++ b/drivers/net/wireless/broadcom/b43/phy_n.c
> @@ -4601,16 +4601,6 @@ static void b43_nphy_spur_workaround(struct b43_wldev *dev)
> if (nphy->hang_avoid)
> b43_nphy_stay_in_carrier_search(dev, 1);
>
> - if (nphy->gband_spurwar_en) {
> - /* TODO: N PHY Adjust Analog Pfbw (7) */
> - if (channel == 11 && b43_is_40mhz(dev)) {
> - ; /* TODO: N PHY Adjust Min Noise Var(2, tone, noise)*/
> - } else {
> - ; /* TODO: N PHY Adjust Min Noise Var(0, NULL, NULL)*/
> - }
> - /* TODO: N PHY Adjust CRS Min Power (0x1E) */
> - }
> -
> if (nphy->aband_spurwar_en) {
> if (channel == 54) {
> tone[0] = 0x20;
> @@ -4636,12 +4626,6 @@ static void b43_nphy_spur_workaround(struct b43_wldev *dev)
> tone[0] = 0;
> noise[0] = 0;
> }
> -
> - if (!tone[0] && !noise[0]) {
> - ; /* TODO: N PHY Adjust Min Noise Var(1, tone, noise)*/
> - } else {
> - ; /* TODO: N PHY Adjust Min Noise Var(0, NULL, NULL)*/
> - }
> }
>
> if (nphy->hang_avoid)
> --
> 1.8.3.1
>
--
Julian Calaby
Email: julian.calaby at gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
prev parent reply other threads:[~2021-01-28 10:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-28 8:47 [PATCH] b43: Remove redundant code Abaci Team
2021-01-28 10:29 ` Julian Calaby [this message]
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='CAGRGNgWM=dQx4suXZJX+u6m0i4=Qx3hZFZWdWJ8VO+FG_edH2w@mail.gmail.com' \
--to=julian.calaby@gmail.com \
--cc=abaci-bugfix@linux.alibaba.com \
--cc=b43-dev@lists.infradead.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=lee.jones@linaro.org \
--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;
as well as URLs for NNTP newsgroup(s).