Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932800AbdGKOM0 (ORCPT ); Tue, 11 Jul 2017 10:12:26 -0400 Received: from mga11.intel.com ([192.55.52.93]:20242 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755854AbdGKOMY (ORCPT ); Tue, 11 Jul 2017 10:12:24 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,346,1496127600"; d="scan'208";a="285493899" Date: Tue, 11 Jul 2017 22:11:43 +0800 From: kbuild test robot To: Mauricio Faria de Oliveira Cc: kbuild-all@01.org, jejb@linux.vnet.ibm.com, martin.petersen@oracle.com, hare@suse.de, bart.vanassche@sandisk.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: scsi_dh_alua: fix boolreturn.cocci warnings Message-ID: <20170711141143.GA7961@intel11.lkp.intel.com> References: <201707112121.bRdlbO7o%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1499726857-7875-4-git-send-email-mauricfo@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 848 Lines: 25 drivers/scsi/device_handler/scsi_dh_alua.c:594:9-10: WARNING: return of 0/1 in function 'alua_rtpg_print_check' 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 Fixes: cb809ba2fcbf ("scsi: scsi_dh_alua: do not print RTPG state if it remains unavailable/standby") CC: Mauricio Faria de Oliveira Signed-off-by: Fengguang Wu --- scsi_dh_alua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -591,7 +591,7 @@ static bool alua_rtpg_print_check(int ol case SCSI_ACCESS_STATE_STANDBY: return old_state != new_state; default: - return 1; + return true; } }