All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <stf_xl@wp.pl>
To: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	"Kalle Valo" <kvalo@kernel.org>,
	"Tomislav Požega" <pozega.tomislav@gmail.com>,
	"Daniel Golle" <daniel@makrotopia.org>
Subject: Re: [PATCH 1/2] rt2x00: Remove unusued value
Date: Fri, 3 Jan 2025 09:55:40 +0100	[thread overview]
Message-ID: <20250103085540.GA94204@wp.pl> (raw)
In-Reply-To: <20241221124445.1094460-2-ariel.otilibili-anieli@eurecom.fr>

On Sat, Dec 21, 2024 at 01:39:32PM +0100, Ariel Otilibili wrote:
> Coverity-ID: 1525307
> Signed-off-by: Ariel Otilibili <ariel.otilibili-anieli@eurecom.fr>
> ---
>  drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> index 60c2a12e9d5e..e5f553a1ea24 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
> @@ -8882,13 +8882,10 @@ static void rt2800_rxiq_calibration(struct rt2x00_dev *rt2x00dev)
>  
>  	for (ch_idx = 0; ch_idx < 2; ch_idx = ch_idx + 1) {
>  		if (ch_idx == 0) {
> -			rfval = rfb0r1 & (~0x3);
>  			rfval = rfb0r1 | 0x1;

I wonder if intention here was different, for example:

 			rfval = rfb0r1 & (~0x3);
  			rfval = rfval | 0x1;

For me the patch looks ok - it does not change existing behaviour,
since rfval is overwritten by second line anyway.

Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>

But Tomislav and Daniel, please check if this code is correct.

>  			rt2800_rfcsr_write_bank(rt2x00dev, 0, 1, rfval);
> -			rfval = rfb0r2 & (~0x33);
>  			rfval = rfb0r2 | 0x11;
>  			rt2800_rfcsr_write_bank(rt2x00dev, 0, 2, rfval);
> -			rfval = rfb0r42 & (~0x50);
>  			rfval = rfb0r42 | 0x10;
>  			rt2800_rfcsr_write_bank(rt2x00dev, 0, 42, rfval);
>  
> @@ -8901,13 +8898,10 @@ static void rt2800_rxiq_calibration(struct rt2x00_dev *rt2x00dev)
>  
>  			rt2800_bbp_dcoc_write(rt2x00dev, 1, 0x00);
>  		} else {
> -			rfval = rfb0r1 & (~0x3);
>  			rfval = rfb0r1 | 0x2;
>  			rt2800_rfcsr_write_bank(rt2x00dev, 0, 1, rfval);
> -			rfval = rfb0r2 & (~0x33);
>  			rfval = rfb0r2 | 0x22;
>  			rt2800_rfcsr_write_bank(rt2x00dev, 0, 2, rfval);
> -			rfval = rfb0r42 & (~0x50);
>  			rfval = rfb0r42 | 0x40;
>  			rt2800_rfcsr_write_bank(rt2x00dev, 0, 42, rfval);
>  
> -- 
> 2.47.1
> 

  reply	other threads:[~2025-01-03  9:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-21 12:39 [PATCH 0/2] rt2x00,net/phy,neterion: Remove dead values Ariel Otilibili
2024-12-21 12:39 ` [PATCH 1/2] rt2x00: Remove unusued value Ariel Otilibili
2025-01-03  8:55   ` Stanislaw Gruszka [this message]
2025-01-03 11:40     ` Daniel Golle
2025-01-03 13:10       ` Stanislaw Gruszka
2025-01-03 13:39         ` Ariel Otilibili-Anieli
2025-01-04 10:37           ` Stanislaw Gruszka
2025-01-04 12:51             ` Ariel Otilibili-Anieli
2025-01-05 21:21               ` Daniel Golle
2025-01-06  7:23                 ` Ariel Otilibili-Anieli
2025-01-07 10:23                   ` Stanislaw Gruszka
2025-01-07 11:01                   ` Jonas Gorski
2025-01-10 13:12   ` [1/2] wifi: rt2x00: Remove unused rfval values Kalle Valo
2024-12-21 12:39 ` [PATCH 2/2] net/phy,neterion: Remove dead values Ariel Otilibili
2024-12-21 15:06   ` Andrew Lunn

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=20250103085540.GA94204@wp.pl \
    --to=stf_xl@wp.pl \
    --cc=ariel.otilibili-anieli@eurecom.fr \
    --cc=daniel@makrotopia.org \
    --cc=kvalo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pozega.tomislav@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.