linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@01.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org, linus.walleij@linaro.org,
	gnurou@gmail.com, yong.b.li@intel.com,
	andriy.shevchenko@linux.intel.com, ismo.puustinen@intel.com,
	preid@electromag.com.au
Subject: [PATCH] gpio: pca953x: fix boolreturn.cocci warnings
Date: Thu, 7 Apr 2016 12:17:39 +0800	[thread overview]
Message-ID: <20160407041739.GA8137@lkp-nhm1> (raw)
In-Reply-To: <1459995341-15341-1-git-send-email-yong.b.li@intel.com>

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 */

      reply	other threads:[~2016-04-07  4:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07  4:17 [PATCH] gpio: pca953x: add PCAL9535 interrupt support for Galileo Gen2 kbuild test robot
2016-04-07  2:15 ` Yong Li
2016-04-07  4:17   ` kbuild test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160407041739.GA8137@lkp-nhm1 \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gnurou@gmail.com \
    --cc=ismo.puustinen@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=preid@electromag.com.au \
    --cc=yong.b.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).