@@ -1969,8 +1969,6 @@ static void en_dis_err_alarms(struct s2io_nic *nic, u16 mask, int flag)MC_ERR_REG_ECC_ALL_DBL|PLL_LOCK_N,flag,&bar0->mc_err_mask);}-nic->general_int_mask=gen_int_mask;-/* Remove this line when alarm interrupts are enabled */nic->general_int_mask=0;}
@@ -1969,8 +1969,6 @@ static void en_dis_err_alarms(struct s2io_nic *nic, u16 mask, int flag)MC_ERR_REG_ECC_ALL_DBL|PLL_LOCK_N,flag,&bar0->mc_err_mask);}-nic->general_int_mask=gen_int_mask;-/* Remove this line when alarm interrupts are enabled */nic->general_int_mask=0;
So this change looks reasonable, but you need to update the comment,
because it is now wrong.
I can see why a static analysis tool would point this out, but you
need to include some justification why your change is correct, and it
is not a bug, maybe cfg should be written back after being masked? Or
the assignment to cfg should actually be an |= not = ?
Andrew
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.
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.
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.
Hello Stanislaw, hello Daniel; happy new year,
On Friday, January 03, 2025 14:10 CET, Stanislaw Gruszka [off-list ref] wrote:
On Fri, Jan 03, 2025 at 11:40:52AM +0000, Daniel Golle wrote:
quoted
On Fri, Jan 03, 2025 at 09:55:40AM +0100, Stanislaw Gruszka wrote:
I agree with the likely intention here, however, the vendor driver
also comes with the dead code, see
https://github.com/lixuande/rt2860v2/blob/master/files/rt2860v2/common/cmm_rf_cal.c#L2690
So this is certainly a bug in the vendor driver as well which got ported
bug-by-bug to rt2x00... Not sure what is the best thing to do in this
case.
As this was already tested and match vendor driver I would prefer
not to change behavior even if it looks suspicious.
Thanks for having looked into this; I much appreciate your feedback.
From what you two said, I understand that the patch should remove the duplicate code, and not change the logic behind.
Is this right?
If so; then, I have nothing else to do.
Hi
On Fri, Jan 03, 2025 at 02:39:21PM +0100, Ariel Otilibili-Anieli wrote:
On Friday, January 03, 2025 14:10 CET, Stanislaw Gruszka [off-list ref] wrote:
quoted
On Fri, Jan 03, 2025 at 11:40:52AM +0000, Daniel Golle wrote:
quoted
On Fri, Jan 03, 2025 at 09:55:40AM +0100, Stanislaw Gruszka wrote:
I agree with the likely intention here, however, the vendor driver
also comes with the dead code, see
https://github.com/lixuande/rt2860v2/blob/master/files/rt2860v2/common/cmm_rf_cal.c#L2690
So this is certainly a bug in the vendor driver as well which got ported
bug-by-bug to rt2x00... Not sure what is the best thing to do in this
case.
As this was already tested and match vendor driver I would prefer
not to change behavior even if it looks suspicious.
Thanks for having looked into this; I much appreciate your feedback.
From what you two said, I understand that the patch should remove the duplicate code, and not change the logic behind.
Is this right?
Hi Stanislaw,
On Saturday, January 04, 2025 11:37 CET, Stanislaw Gruszka [off-list ref] wrote:
Hi
On Fri, Jan 03, 2025 at 02:39:21PM +0100, Ariel Otilibili-Anieli wrote:
quoted
On Friday, January 03, 2025 14:10 CET, Stanislaw Gruszka [off-list ref] wrote:
Thanks for having looked into this; I much appreciate your feedback.
From what you two said, I understand that the patch should remove the duplicate code, and not change the logic behind.
Is this right?
Yes.
Great, then; thanks for having acked the patch as such.
Thanks for having put some time into the research, Daniel; I looked into the openwrt archives for 2024, none of Shiji’s messages mentions that patch.
Though, if you three agree, I will push a new series, modelled on that patch, and you as Suggested-by.
Have a good week,
Ariel
Thanks for having put some time into the research, Daniel; I looked into the openwrt archives for 2024, none of Shiji’s messages mentions that patch.
Though, if you three agree, I will push a new series, modelled on that patch, and you as Suggested-by.
Please post that change. But to not mix it with
patches against other drivers in the same series.
(multiple rt2x00 patches in one patchset are ok).
And please use "wifi: rt2x00:" as subject prefix.
Thanks
Stanislaw
Thanks for having put some time into the research, Daniel; I looked into the openwrt archives for 2024, none of Shiji’s messages mentions that patch.
You didn't find anything because these changes came in via a PR on
github: https://github.com/openwrt/openwrt/pull/16845 :) OpenWrt
accepts contributions both via email and PR on github.
Best Regards,
Jonas
From: Kalle Valo <kvalo@kernel.org> Date: 2025-01-10 13:12:22
Ariel Otilibili [off-list ref] wrote:
The intention here is not clear but as this was already tested and matches
vendor driver it's better not to change behavior even if it looks suspicious.
So just remove the unused values.
Coverity-ID: 1525307
Signed-off-by: Ariel Otilibili <redacted>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
[kvalo@kernel.org: write commit message]