Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1373060

[PATCH] gpio: pca953x: fix boolreturn.cocci warnings

From kbuild test robot <lkp@intel.com>
Newsgroups linux.kernel
Subject [PATCH] gpio: pca953x: fix boolreturn.cocci warnings
Date 2016-04-07 06:20 +0200
Message-ID <rl9Ae-6ED-15@gated-at.bofh.it> (permalink)
References <rl9Ad-6ED-9@gated-at.bofh.it> <rl7RL-5jp-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


drivers/gpio/gpio-pca953x.c:522:10-11: WARNING: return of 0/1 in function 'pca953x_irq_pending' 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

CC: Yong Li <yong.b.li@intel.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 gpio-pca953x.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -519,12 +519,12 @@ static bool pca953x_irq_pending(struct p
 		/* Read the current interrupt status from the device */
 		ret = pca953x_read_regs(chip, PCAL953X_INT_STAT, trigger);
 		if (ret)
-			return 0;
+			return false;
 
 		/* Check latched inputs and clear interrupt status */
 		ret = pca953x_read_regs(chip, PCA953X_INPUT, cur_stat);
 		if (ret)
-			return 0;
+			return false;
 
 		for (i = 0; i < NBANK(chip); i++) {
 			/* Apply filter for rising/falling edge selection */

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] gpio: pca953x: add PCAL9535 interrupt support for Galileo Gen2 Yong Li <yong.b.li@intel.com> - 2016-04-07 04:30 +0200
  Re: [PATCH] gpio: pca953x: add PCAL9535 interrupt support for  Galileo Gen2 kbuild test robot <lkp@intel.com> - 2016-04-07 06:20 +0200
  [PATCH] gpio: pca953x: fix boolreturn.cocci warnings kbuild test robot <lkp@intel.com> - 2016-04-07 06:20 +0200

csiph-web