From mboxrd@z Thu Jan 1 00:00:00 1970 From: kbuild test robot Subject: [PATCH] gpio: pca953x: fix boolreturn.cocci warnings Date: Thu, 7 Apr 2016 12:17:39 +0800 Message-ID: <20160407041739.GA8137@lkp-nhm1> References: <201604071254.vQU9Z1Qg%fengguang.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga14.intel.com ([192.55.52.115]:65408 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750760AbcDGES5 (ORCPT ); Thu, 7 Apr 2016 00:18:57 -0400 Content-Disposition: inline In-Reply-To: <1459995341-15341-1-git-send-email-yong.b.li@intel.com> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org 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 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 Signed-off-by: Fengguang Wu --- 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 */