Skip to content

Commit

Permalink
RISC-V: Logical vs Bitwise typo
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
  • Loading branch information
Dan Carpenter authored and palmer-dabbelt committed Dec 11, 2017
1 parent 50c4c4e commit 86ad5c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/riscv/kernel/sys_riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ SYSCALL_DEFINE3(riscv_flush_icache, uintptr_t, start, uintptr_t, end,
bool local = (flags & SYS_RISCV_FLUSH_ICACHE_LOCAL) != 0;

/* Check the reserved flags. */
if (unlikely(flags & !SYS_RISCV_FLUSH_ICACHE_ALL))
if (unlikely(flags & ~SYS_RISCV_FLUSH_ICACHE_ALL))
return -EINVAL;

flush_icache_mm(mm, local);
Expand Down

0 comments on commit 86ad5c9

Please sign in to comment.