summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>2022-02-28 17:15:07 -0800
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2022-03-01 10:08:45 +0100
commit5d8965704fe5662e2e4a7e4424a2cbe53e182670 (patch)
treef2e3c440921ab82da102627a037d6363dd1dab66 /arch/mips
parent1e6ae0e46e32749b130f1823da30cea9aa2a59a0 (diff)
downloadlinux-5d8965704fe5662e2e4a7e4424a2cbe53e182670.tar.bz2
MIPS: ralink: mt7621: use bitwise NOT instead of logical
It was the intention to reverse the bits, not make them all zero by using logical NOT operator. Fixes: cc19db8b312a ("MIPS: ralink: mt7621: do memory detection on KSEG1") Suggested-by: Chuanhong Guo <gch981213@gmail.com> Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/ralink/mt7621.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/ralink/mt7621.c b/arch/mips/ralink/mt7621.c
index 12c8808e0dea..fb0565bc34fd 100644
--- a/arch/mips/ralink/mt7621.c
+++ b/arch/mips/ralink/mt7621.c
@@ -69,7 +69,7 @@ static bool __init mt7621_addr_wraparound_test(phys_addr_t size)
__raw_writel(MT7621_MEM_TEST_PATTERN, dm);
if (__raw_readl(dm) != __raw_readl(dm + size))
return false;
- __raw_writel(!MT7621_MEM_TEST_PATTERN, dm);
+ __raw_writel(~MT7621_MEM_TEST_PATTERN, dm);
return __raw_readl(dm) == __raw_readl(dm + size);
}