Unverified Commit 86ad5c97 authored by Dan Carpenter's avatar Dan Carpenter Committed by Palmer Dabbelt
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
parent 50c4c4e2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);