[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250103085540.GA94204@wp.pl>
Date: Fri, 3 Jan 2025 09:55:40 +0100
From: Stanislaw Gruszka <stf_xl@...pl>
To: Ariel Otilibili <ariel.otilibili-anieli@...ecom.fr>
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
Kalle Valo <kvalo@...nel.org>,
Tomislav Požega <pozega.tomislav@...il.com>,
Daniel Golle <daniel@...rotopia.org>
Subject: Re: [PATCH 1/2] rt2x00: Remove unusued value
On Sat, Dec 21, 2024 at 01:39:32PM +0100, Ariel Otilibili wrote:
> Coverity-ID: 1525307
> Signed-off-by: Ariel Otilibili <ariel.otilibili-anieli@...ecom.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@...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
>
Powered by blists - more mailing lists