[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200528224353.32559-1-palmer@dabbelt.com>
Date: Thu, 28 May 2020 15:43:52 -0700
From: Palmer Dabbelt <palmer@...belt.com>
To: linux-riscv@...ts.infradead.org
Cc: Palmer Dabbelt <palmer@...belt.com>,
Paul Walmsley <paul.walmsley@...ive.com>, yash.shah@...ive.com,
anup@...infault.org, bp@...e.de, linux-riscv@...ts.infradead.org,
linux-kernel@...r.kernel.org, kernel-team@...roid.com,
kernel-team@...roid.com, Palmer Dabbelt <palmerdabbelt@...gle.com>
Subject: [PATCH 1/2] soc: sifive: l2 cache: Eliminate an unsigned zero compare warning
From: Palmer Dabbelt <palmerdabbelt@...gle.com>
GCC warns about this comparison, which is unnecessary.
Signed-off-by: Palmer Dabbelt <palmerdabbelt@...gle.com>
---
drivers/soc/sifive/sifive_l2_cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/sifive/sifive_l2_cache.c b/drivers/soc/sifive/sifive_l2_cache.c
index d5f266551880..51e198880a8d 100644
--- a/drivers/soc/sifive/sifive_l2_cache.c
+++ b/drivers/soc/sifive/sifive_l2_cache.c
@@ -51,7 +51,7 @@ static ssize_t l2_write(struct file *file, const char __user *data,
if (kstrtouint_from_user(data, count, 0, &val))
return -EINVAL;
- if ((val >= 0 && val < 0xFF) || (val >= 0x10000 && val < 0x100FF))
+ if ((val < 0xFF) || (val >= 0x10000 && val < 0x100FF))
writel(val, l2_base + SIFIVE_L2_ECCINJECTERR);
else
return -EINVAL;
--
2.27.0.rc0.183.gde8f92d652-goog
Powered by blists - more mailing lists