From mboxrd@z Thu Jan 1 00:00:00 1970 From: kbuild test robot Subject: [PATCH] hpsa: fix boolreturn.cocci warnings Date: Sat, 10 Sep 2016 11:05:48 +0800 Message-ID: <20160910030548.GA243055@lkp-ib03> References: <201609101123.03n9exm4%fengguang.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga02.intel.com ([134.134.136.20]:9234 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750760AbcIJDG3 (ORCPT ); Fri, 9 Sep 2016 23:06:29 -0400 Content-Disposition: inline In-Reply-To: <147345662985.19269.15459802044850867924.stgit@brunhilda> Sender: linux-scsi-owner@vger.kernel.org List-Id: linux-scsi@vger.kernel.org To: Don Brace Cc: kbuild-all@01.org, jejb@linux.vnet.ibm.com, john.hall@microsemi.com, Kevin.Barnett@microsemi.com, Mahesh.Rajashekhara@microsemi.com, hch@infradead.org, scott.teel@microsemi.com, Viswas.G@microsemi.com, Justin.Lindley@microsemi.com, scott.benesh@microsemi.com, elliott@hpe.com, linux-scsi@vger.kernel.org drivers/scsi/hpsa.c:3473:9-10: WARNING: return of 0/1 in function 'hpsa_vpd_page_supported' 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: Scott Teel Signed-off-by: Fengguang Wu --- hpsa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -3470,7 +3470,7 @@ static bool hpsa_vpd_page_supported(stru buf = kzalloc(256, GFP_KERNEL); if (!buf) - return 0; + return false; /* Get the size of the page list first */ rc = hpsa_scsi_do_inquiry(h, scsi3addr, @@ -3497,10 +3497,10 @@ static bool hpsa_vpd_page_supported(stru goto exit_supported; exit_unsupported: kfree(buf); - return 0; + return false; exit_supported: kfree(buf); - return 1; + return true; } static void hpsa_get_ioaccel_status(struct ctlr_info *h,