summaryrefslogtreecommitdiff
path: root/drivers/soc
diff options
context:
space:
mode:
authorPalmer Dabbelt <palmerdabbelt@google.com>2020-05-29 00:18:12 +0300
committerPalmer Dabbelt <palmerdabbelt@google.com>2020-05-29 01:57:48 +0300
commitb4a4f036e84662bb5fca53ed09d65ac4f736be67 (patch)
treebbe21de2826e93566d23b156e03062a40c11a83b /drivers/soc
parent4a3a37331248d85df9e05e9b1d8210dc5ec81f4e (diff)
downloadlinux-b4a4f036e84662bb5fca53ed09d65ac4f736be67.tar.xz
soc: sifive: l2 cache: Eliminate an unsigned zero compare warning
GCC warns about this comparison, which is unnecessary. Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/sifive/sifive_l2_cache.c2
1 files changed, 1 insertions, 1 deletions
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;