Skip to content

Commit 5d89657

Browse files
lipnitsktsbogend
authored andcommitted
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: cc19db8 ("MIPS: ralink: mt7621: do memory detection on KSEG1") Suggested-by: Chuanhong Guo <[email protected]> Signed-off-by: Ilya Lipnitskiy <[email protected]> Reviewed-by: Sergio Paracuellos <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent 1e6ae0e commit 5d89657

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/ralink/mt7621.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static bool __init mt7621_addr_wraparound_test(phys_addr_t size)
6969
__raw_writel(MT7621_MEM_TEST_PATTERN, dm);
7070
if (__raw_readl(dm) != __raw_readl(dm + size))
7171
return false;
72-
__raw_writel(!MT7621_MEM_TEST_PATTERN, dm);
72+
__raw_writel(~MT7621_MEM_TEST_PATTERN, dm);
7373
return __raw_readl(dm) == __raw_readl(dm + size);
7474
}
7575

0 commit comments

Comments
 (0)