aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-12-09 06:49:14 -0500
committerPalmer Dabbelt <palmer@dabbelt.com>2017-12-11 10:51:06 -0500
commit86ad5c97ce5ccdda1459d35370fd5e105721bb8d (patch)
treef1c809ce91956d989ebe5f03c04caac00b00ae99
parent50c4c4e268a2d7a3e58ebb698ac74da0de40ae36 (diff)
RISC-V: Logical vs Bitwise typo
In the current code, there is a ! logical NOT where a bitwise ~ NOT was intended. It means that we never return -EINVAL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
-rw-r--r--arch/riscv/kernel/sys_riscv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kernel/sys_riscv.c b/arch/riscv/kernel/sys_riscv.c
index a2ae936a093e..79c78668258e 100644
--- a/arch/riscv/kernel/sys_riscv.c
+++ b/arch/riscv/kernel/sys_riscv.c
@@ -70,7 +70,7 @@ SYSCALL_DEFINE3(riscv_flush_icache, uintptr_t, start, uintptr_t, end,
70 bool local = (flags & SYS_RISCV_FLUSH_ICACHE_LOCAL) != 0; 70 bool local = (flags & SYS_RISCV_FLUSH_ICACHE_LOCAL) != 0;
71 71
72 /* Check the reserved flags. */ 72 /* Check the reserved flags. */
73 if (unlikely(flags & !SYS_RISCV_FLUSH_ICACHE_ALL)) 73 if (unlikely(flags & ~SYS_RISCV_FLUSH_ICACHE_ALL))
74 return -EINVAL; 74 return -EINVAL;
75 75
76 flush_icache_mm(mm, local); 76 flush_icache_mm(mm, local);