linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug report] Probably variable is being overwritten
@ 2022-10-04  7:52 Muhammad Usama Anjum
  0 siblings, 0 replies; only message in thread
From: Muhammad Usama Anjum @ 2022-10-04  7:52 UTC (permalink / raw)
  To: Tomislav Požega, Daniel Golle, Kalle Valo
  Cc: usama.anjum, netdev, linux-kernel, linux-wireless,
	Collabora Kernel ML, kernel-janitors

Hi,

A bit in rfb0r1 is being cleared and result is stored in rfval. Then the
first bit is being set without reusing the rfval. It is probably bug or
dead code? The same pattern can be seen repeated below as well.


diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
index cbbb1a4849cf..4857e3818418 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
@@ -8844,7 +8844,7 @@ 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;
+                       rfval = rfval | 0x1;
                        rt2800_rfcsr_write_bank(rt2x00dev, 0, 1, rfval);
                        rfval = rfb0r2 & (~0x33);
                        rfval = rfb0r2 | 0x11;


-- 
Muhammad Usama Anjum

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-04  7:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-04  7:52 [Bug report] Probably variable is being overwritten Muhammad Usama Anjum

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).