Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753388AbbGaSA2 (ORCPT ); Fri, 31 Jul 2015 14:00:28 -0400 Received: from smtprelay0176.hostedemail.com ([216.40.44.176]:55975 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753377AbbGaSA0 (ORCPT ); Fri, 31 Jul 2015 14:00:26 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3871:3872:3874:4321:5007:6119:6261:6691:6742:7903:10004:10400:10848:11026:11232:11473:11658:11914:12043:12517:12519:12740:13069:13161:13229:13311:13357:14096:14097: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: town72_5aabc1ae9505a X-Filterd-Recvd-Size: 2385 Message-ID: <1438365622.19675.97.camel@perches.com> Subject: Re: [PATCH 14/15] mm: Drop unlikely before IS_ERR(_OR_NULL) From: Joe Perches To: Viresh Kumar Cc: yalin wang , "Kirill A. Shutemov" , Andrew Morton , linaro-kernel@lists.linaro.org, open list , "Aneesh Kumar K.V" , David Rientjes , Ebru Akagunduz , Johannes Weiner , "Kirill A. Shutemov" , "open list:MEMORY MANAGEMENT" , Mel Gorman , Michal Hocko , Vlastimil Babka Date: Fri, 31 Jul 2015 11:00:22 -0700 In-Reply-To: <20150731110637.GB899@linux> References: <91586af267deb26b905fba61a9f1f665a204a4e3.1438331416.git.viresh.kumar@linaro.org> <20150731085646.GA31544@node.dhcp.inet.fi> <20150731093450.GA7505@linux> <1438338481.19675.72.camel@perches.com> <20150731110637.GB899@linux> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1011 Lines: 26 On Fri, 2015-07-31 at 16:36 +0530, Viresh Kumar wrote: > On 31-07-15, 03:28, Joe Perches wrote: > > If it's all fixed, then it's unlikely to be needed in checkpatch. > > I thought checkpatch is more about not committing new mistakes, rather than > finding them in old code. True, but checkpatch is more about style than substance. There are a lot of things that _could_ be added to the script but don't have to be because of relative rarity. The unanswered fundamental though is whether the unlikely use in #define IS_ERR_VALUE is useful. include/linux/err.h:21:#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO) How often does using unlikely here make the code smaller/faster with more recent compilers than gcc 3.4? Or even using gcc 3.4. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/