xtensa: Return true/false (not 1/0) from bool function
PATCH 1/1 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]>
--- arch/xtensa/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/xtensa/kernel/traps.c +1 -1
@@ -301,7 +301,7 @@ static bool check_div0(struct pt_regs *regs)if (user_mode (regs)) {if (copy_from_user (buf, (void __user *)regs->pc +2 ,5 )) -return 0 ; +return false; p = buf; }else { p = (const u8 *)regs->pc +2 ;
Signature · 1 line
2.20.1.7.g153144c
Quoted 4 lines · Yang Li
Return boolean values ("true" or "false") instead of 1 or 0 from bool function. This fixes the following warnings from coccicheck:
Quoted 8 lines
./arch/xtensa/kernel/traps.c:304:10-11: WARNING: return of 0/1 in function '
check_div0' with return type boolReported-by Abaci Robot <[email protected]>Signed-off-by Yang Li <[email protected]>--- arch/xtensa/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks! Applied to my xtensa tree.
-- Max