From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752148AbbCYV4z (ORCPT ); Wed, 25 Mar 2015 17:56:55 -0400 Received: from mga11.intel.com ([192.55.52.93]:30237 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbbCYV4w (ORCPT ); Wed, 25 Mar 2015 17:56:52 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,467,1422950400"; d="scan'208";a="546359047" Date: Thu, 26 Mar 2015 05:55:25 +0800 From: kbuild test robot To: Varun Prakash Cc: kbuild-all@01.org, Hariprasad S , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cxgb4: fix boolreturn.cocci warnings Message-ID: <20150325215525.GA26868@athens> References: <201503260524.AdqSbov9%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503260524.AdqSbov9%fengguang.wu@intel.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 drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c:49:9-10: WARNING: return of 0/1 in function 'cxgb_fcoe_sof_eof_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: Varun Prakash Signed-off-by: Fengguang Wu --- cxgb4_fcoe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_fcoe.c @@ -46,17 +46,17 @@ bool cxgb_fcoe_sof_eof_supported(struct if ((sof != FC_SOF_I3) && (sof != FC_SOF_N3)) { dev_err(adap->pdev_dev, "Unsupported SOF 0x%x\n", sof); - return 0; + return false; } skb_copy_bits(skb, skb->len - 4, &eof, 1); if ((eof != FC_EOF_N) && (eof != FC_EOF_T)) { dev_err(adap->pdev_dev, "Unsupported EOF 0x%x\n", eof); - return 0; + return false; } - return 1; + return true; } /**