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 <[email protected]>
Signed-off-by: Palmer Dabbelt <[email protected]>
This commit is contained in:
Dan Carpenter 2017-12-09 14:49:14 +03:00 • committed by Palmer Dabbelt
commit 86ad5c97ce
No known key found for this signature in database
GPG key ID: EF4CA1502CCBAB41

View file

@ -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);