* [PATCH] MIPS: ralink: mt7621: use bitwise NOT instead of logical
@ 2022-03-01 1:15 Ilya Lipnitskiy
2022-03-01 6:47 ` Sergio Paracuellos
2022-03-01 9:10 ` Thomas Bogendoerfer
0 siblings, 2 replies; 3+ messages in thread
From: Ilya Lipnitskiy @ 2022-03-01 1:15 UTC (permalink / raw)
To: John Crispin, Thomas Bogendoerfer, Matthias Brugger,
Chuanhong Guo, Ilya Lipnitskiy, linux-mips, linux-arm-kernel,
linux-mediatek, linux-kernel
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>
---
arch/mips/ralink/mt7621.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
}
--
2.35.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: ralink: mt7621: use bitwise NOT instead of logical
2022-03-01 1:15 [PATCH] MIPS: ralink: mt7621: use bitwise NOT instead of logical Ilya Lipnitskiy
@ 2022-03-01 6:47 ` Sergio Paracuellos
2022-03-01 9:10 ` Thomas Bogendoerfer
1 sibling, 0 replies; 3+ messages in thread
From: Sergio Paracuellos @ 2022-03-01 6:47 UTC (permalink / raw)
To: Ilya Lipnitskiy
Cc: John Crispin, Thomas Bogendoerfer, Matthias Brugger,
Chuanhong Guo, open list:MIPS, linux-arm-kernel,
moderated list:ARM/Mediatek SoC support, linux-kernel
Hi Ilya,
On Tue, Mar 1, 2022 at 2:49 AM Ilya Lipnitskiy
<ilya.lipnitskiy@gmail.com> wrote:
>
> 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>
> ---
> arch/mips/ralink/mt7621.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Thanks,
Sergio Paracuellos
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] MIPS: ralink: mt7621: use bitwise NOT instead of logical
2022-03-01 1:15 [PATCH] MIPS: ralink: mt7621: use bitwise NOT instead of logical Ilya Lipnitskiy
2022-03-01 6:47 ` Sergio Paracuellos
@ 2022-03-01 9:10 ` Thomas Bogendoerfer
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 2022-03-01 9:10 UTC (permalink / raw)
To: Ilya Lipnitskiy
Cc: John Crispin, Matthias Brugger, Chuanhong Guo, linux-mips,
linux-arm-kernel, linux-mediatek, linux-kernel
On Mon, Feb 28, 2022 at 05:15:07PM -0800, Ilya Lipnitskiy wrote:
> 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>
> ---
> arch/mips/ralink/mt7621.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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);
> }
>
> --
> 2.35.1
applied to mips-fixes
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-01 9:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-01 1:15 [PATCH] MIPS: ralink: mt7621: use bitwise NOT instead of logical Ilya Lipnitskiy
2022-03-01 6:47 ` Sergio Paracuellos
2022-03-01 9:10 ` Thomas Bogendoerfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox