[Intel-wired-lan] [PATCH] igc: fix boolreturn.cocci warnings
kbuild test robot
lkp at intel.com
Wed Mar 18 05:40:16 UTC 2020
From: kbuild test robot <lkp at intel.com>
drivers/net/ethernet/intel/igc/igc_diag.c:119:9-10: WARNING: return of 0/1 in function 'igc_reg_test' with return type bool
Return statements in functions returning bool should use
true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci
Fixes: a6017405fcd0 ("igc: add support to interrupt, eeprom, registers and link self-tests")
CC: Vitaly Lifshits <vitaly.lifshits at intel.com>
Signed-off-by: kbuild test robot <lkp at intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git dev-queue
head: a6017405fcd0cda0cd9f35b34cae92400cf9e3e3
commit: a6017405fcd0cda0cd9f35b34cae92400cf9e3e3 [49/49] igc: add support to interrupt, eeprom, registers and link self-tests
igc_diag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/ethernet/intel/igc/igc_diag.c
+++ b/drivers/net/ethernet/intel/igc/igc_diag.c
@@ -116,7 +116,7 @@ bool igc_reg_test(struct igc_adapter *ad
"failed STATUS register test got: 0x%08X expected: 0x%08X\n",
after, value);
*data = 1;
- return 1;
+ return true;
}
/* restore previous status */
wr32(IGC_STATUS, before);
More information about the Intel-wired-lan
mailing list