Commit dc60001e authored by Yang Li's avatar Yang Li Committed by Max Filippov

xtensa: Return true/false (not 1/0) from bool function

Return boolean values ("true" or "false") instead of 1 or 0 from bool
function. This fixes the following warnings from coccicheck:

./arch/xtensa/kernel/traps.c:304:10-11: WARNING: return of 0/1 in
function 'check_div0' with return type bool
Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
Message-Id: <20220518230953.112266-1-yang.lee@linux.alibaba.com>
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
parent 5cc5f19f
...@@ -301,7 +301,7 @@ static bool check_div0(struct pt_regs *regs) ...@@ -301,7 +301,7 @@ static bool check_div0(struct pt_regs *regs)
if (user_mode(regs)) { if (user_mode(regs)) {
if (copy_from_user(buf, (void __user *)regs->pc + 2, 5)) if (copy_from_user(buf, (void __user *)regs->pc + 2, 5))
return 0; return false;
p = buf; p = buf;
} else { } else {
p = (const u8 *)regs->pc + 2; p = (const u8 *)regs->pc + 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment