Skip to content

Commit dc60001

Browse files
Yang Lijcmvbkbc
authored andcommitted
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: Abaci Robot <[email protected]> Signed-off-by: Yang Li <[email protected]> Message-Id: <[email protected]> Signed-off-by: Max Filippov <[email protected]>
1 parent 5cc5f19 commit dc60001

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/xtensa/kernel/traps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static bool check_div0(struct pt_regs *regs)
301301

302302
if (user_mode(regs)) {
303303
if (copy_from_user(buf, (void __user *)regs->pc + 2, 5))
304-
return 0;
304+
return false;
305305
p = buf;
306306
} else {
307307
p = (const u8 *)regs->pc + 2;

0 commit comments

Comments
 (0)