linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Don Brace <don.brace@microsemi.com>
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
Subject: [PATCH] hpsa: fix boolreturn.cocci warnings
Date: Sat, 10 Sep 2016 11:05:48 +0800	[thread overview]
Message-ID: <20160910030548.GA243055@lkp-ib03> (raw)
In-Reply-To: <147345662985.19269.15459802044850867924.stgit@brunhilda>

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 <scott.teel@microsemi.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

 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,

  parent reply	other threads:[~2016-09-10  3:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-09 21:30 [PATCH 0/5] hpsa updates Don Brace
2016-09-09 21:30 ` [PATCH 1/5] hpsa: determine device external status earlier Don Brace
2016-09-09 21:30 ` [PATCH 2/5] hpsa: check for null device pointers Don Brace
2016-09-09 21:30 ` [PATCH 3/5] hpsa: check for vpd support before sending Don Brace
2016-09-10  3:05   ` kbuild test robot
2016-09-10  3:05   ` kbuild test robot [this message]
2016-09-09 21:30 ` [PATCH 4/5] hpsa: prevent sending bmic commands to externals Don Brace
2016-09-09 21:30 ` [PATCH 5/5] hpsa: check for null devices in ioaccel submission patch Don Brace
2016-09-14 18:22 ` [PATCH 0/5] hpsa updates Martin K. Petersen

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=20160910030548.GA243055@lkp-ib03 \
    --to=lkp@intel.com \
    --cc=Justin.Lindley@microsemi.com \
    --cc=Kevin.Barnett@microsemi.com \
    --cc=Mahesh.Rajashekhara@microsemi.com \
    --cc=Viswas.G@microsemi.com \
    --cc=don.brace@microsemi.com \
    --cc=elliott@hpe.com \
    --cc=hch@infradead.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=john.hall@microsemi.com \
    --cc=kbuild-all@01.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=scott.benesh@microsemi.com \
    --cc=scott.teel@microsemi.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).