Skip to content

Commit b4a4f03

Browse files
soc: sifive: l2 cache: Eliminate an unsigned zero compare warning
GCC warns about this comparison, which is unnecessary. Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 4a3a373 commit b4a4f03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/sifive/sifive_l2_cache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static ssize_t l2_write(struct file *file, const char __user *data,
5151

5252
if (kstrtouint_from_user(data, count, 0, &val))
5353
return -EINVAL;
54-
if ((val >= 0 && val < 0xFF) || (val >= 0x10000 && val < 0x100FF))
54+
if ((val < 0xFF) || (val >= 0x10000 && val < 0x100FF))
5555
writel(val, l2_base + SIFIVE_L2_ECCINJECTERR);
5656
else
5757
return -EINVAL;

0 commit comments

Comments
 (0)