From patchwork Wed Mar 25 21:55:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kbuild test robot X-Patchwork-Id: 454794 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 97BF1140082 for ; Thu, 26 Mar 2015 08:57:11 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042AbbCYV4y (ORCPT ); Wed, 25 Mar 2015 17:56:54 -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 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 25 Mar 2015 14:56:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,467,1422950400"; d="scan'208";a="546359047" Received: from bee.sh.intel.com (HELO bee) ([10.239.97.14]) by orsmga003.jf.intel.com with ESMTP; 25 Mar 2015 14:56:51 -0700 Received: from kbuild by bee with local (Exim 4.83) (envelope-from ) id 1YatIA-0000Rl-7X; Thu, 26 Mar 2015 05:56:50 +0800 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-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: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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; } /**