From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932120AbbCaUNE (ORCPT ); Tue, 31 Mar 2015 16:13:04 -0400 Received: from smtprelay0243.hostedemail.com ([216.40.44.243]:49905 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753338AbbCaTth (ORCPT ); Tue, 31 Mar 2015 15:49:37 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2110:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3870:3871:3873:4321:5007:6261:7903:9010:10004:10400:10848:11026:11232:11657:11658:11914:12043:12296:12438:12517:12519:12555:12740:13069:13071:13161:13229:13255:13311:13357:13894:21060: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: sound75_364a89351ac08 X-Filterd-Recvd-Size: 2130 Message-ID: <1427831371.18175.18.camel@perches.com> Subject: Re: [PATCH net-next] ethernet: Use bool function returns of true/false instead of 1/0 From: Joe Perches To: monstr@monstr.eu Cc: David Miller , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michal Simek , =?ISO-8859-1?Q?S=F6ren?= Brinkmann Date: Tue, 31 Mar 2015 12:49:31 -0700 In-Reply-To: <551A80AE.7020506@monstr.eu> References: <201503260524.AdqSbov9%fengguang.wu@intel.com> <20150325215525.GA26868@athens> <20150329.121655.2092434262655191613.davem@davemloft.net> <1427678712.2715.52.camel@perches.com> <551A80AE.7020506@monstr.eu> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (shortened cc list) On Tue, 2015-03-31 at 13:10 +0200, Michal Simek wrote: > On 03/30/2015 03:25 AM, Joe Perches wrote: > > Use bool constants as the return values instead of 1 and 0. [] > > 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; > > } > > } > > Kernel-doc should be also fixed in spite of this whole function is just > broken and binding should be fixed to use of_property_read_bool for > these properties. Hi Michal. David's applied this so if you or Sören want to fix up the function and kernel-doc to your taste, please do. cheers, Joe