From patchwork Mon Mar 30 01:25:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 6118101 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id ED602BF4A6 for ; Mon, 30 Mar 2015 01:28:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 13A0620259 for ; Mon, 30 Mar 2015 01:28:33 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 381CC2021F for ; Mon, 30 Mar 2015 01:28:32 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YcOSf-0006hT-FS; Mon, 30 Mar 2015 01:25:53 +0000 Received: from smtprelay0049.hostedemail.com ([216.40.44.49] helo=smtprelay.hostedemail.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YcOSc-0006dg-13 for linux-arm-kernel@lists.infradead.org; Mon, 30 Mar 2015 01:25:50 +0000 Received: from filter.hostedemail.com (unknown [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 634AB23416; Mon, 30 Mar 2015 01:25:18 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2, 0, 0, , d41d8cd98f00b204, joe@perches.com, :::::::::::::::::::::::::::::::::::::::::::::, RULES_HIT:41:355:379:541:800:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3353:3865:3866:3867:3868:4321:5007:6119:6261:6742:6743:7903:10004:10400:10848:11026:11232:11473:11657:11658:11914:12043:12050:12296:12438:12517:12519:12555:13019:13161:13229:13255:14394:21080, 0, RBL:none, CacheIP:none, Bayesian:0.5, 0.5, 0.5, Netcheck:none, DomainCache:0, MSF:not bulk, SPF:fn, MSBL:0, DNSBL:none, Custom_rules:0:0:0 X-HE-Tag: eggs02_67ea954c35331 X-Filterd-Recvd-Size: 4098 Received: from joe-X200MA.home (pool-71-119-66-80.lsanca.fios.verizon.net [71.119.66.80]) (Authenticated sender: joe@perches.com) by omf06.hostedemail.com (Postfix) with ESMTPA; Mon, 30 Mar 2015 01:25:13 +0000 (UTC) Message-ID: <1427678712.2715.52.camel@perches.com> Subject: [PATCH net-next] ethernet: Use bool function returns of true/false instead of 1/0 From: Joe Perches To: David Miller Date: Sun, 29 Mar 2015 18:25:12 -0700 In-Reply-To: <20150329.121655.2092434262655191613.davem@davemloft.net> References: <201503260524.AdqSbov9%fengguang.wu@intel.com> <20150325215525.GA26868@athens> <20150329.121655.2092434262655191613.davem@davemloft.net> X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150329_182550_225212_12C7B9D2 X-CRM114-Status: GOOD ( 11.78 ) X-Spam-Score: -0.0 (/) Cc: linux-arm-kernel , Linux NICS , hariprasad@chelsio.com, Greg Rose , e1000-devel@lists.sourceforge.net, netdev , Mitch Williams , Bruce Allan , LKML , varun@chelsio.com, Jesse Brandeburg , Matthew Vick , John Ronciak , kbuild-all@01.org, Ariel Elior , Don Skidmore , Carolyn Wyborny , fengguang.wu@intel.com, Michal Simek , =?ISO-8859-1?Q?S=F6ren?= Brinkmann , Jeff Kirsher X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use bool constants as the return values instead of 1 and 0. Signed-off-by: Joe Perches Acked-by: Jeff Kirsher --- > To be honest I'd might rather get bunches of these, there has to be a ton > of them, than a slow trickle of one every few weeks/days. There aren't too many... drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 2 +- drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 4 ++-- drivers/net/ethernet/xilinx/xilinx_emaclite.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c index 039b0c1..9980912 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c @@ -11610,7 +11610,7 @@ static bool bnx2x_get_dropless_info(struct bnx2x *bp) u32 cfg; if (IS_VF(bp)) - return 0; + return false; if (IS_MF(bp) && !CHIP_IS_E1x(bp)) { /* Take function: tmp = func */ diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c index 02ffb30..ccaecb1 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c @@ -1351,7 +1351,7 @@ static bool reg_pattern_test(struct ixgbe_adapter *adapter, u64 *data, int reg, if (ixgbe_removed(adapter->hw.hw_addr)) { *data = 1; - return 1; + return true; } for (pat = 0; pat < ARRAY_SIZE(test_pattern); pat++) { before = ixgbe_read_reg(&adapter->hw, reg); @@ -1376,7 +1376,7 @@ static bool reg_set_and_check(struct ixgbe_adapter *adapter, u64 *data, int reg, if (ixgbe_removed(adapter->hw.hw_addr)) { *data = 1; - return 1; + return true; } before = ixgbe_read_reg(&adapter->hw, reg); ixgbe_write_reg(&adapter->hw, reg, write & mask); diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c index 2111b91..6008eee 100644 --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c @@ -1062,7 +1062,7 @@ static bool get_bool(struct platform_device *ofdev, const char *s) } else { dev_warn(&ofdev->dev, "Parameter %s not found," "defaulting to false\n", s); - return 0; + return false; } }