Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936296AbdGTLw4 (ORCPT ); Thu, 20 Jul 2017 07:52:56 -0400 Received: from smtprelay0095.hostedemail.com ([216.40.44.95]:56392 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935414AbdGTLwx (ORCPT ); Thu, 20 Jul 2017 07:52:53 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::,RULES_HIT:41:355:379:541:599:960:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1515:1516:1518:1534:1537:1561:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3622:3876:3877:4321:5007:6114:6642:10004:10400:10848:11026:11473:11658:11914:12740:12760:12895:13069:13311:13357:13439:14659:21080:21627:30054:30060:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:6,LUA_SUMMARY:none X-HE-Tag: snow25_53079e28ab905 X-Filterd-Recvd-Size: 1437 Message-ID: <1500551569.14415.9.camel@perches.com> Subject: Re: [PATCH] lib/int_sqrt.c: Optimize square root function From: Joe Perches To: Peter Zijlstra , Linus Torvalds Cc: Anshul Garg , Davidlohr Bueso , Linux Kernel Mailing List , anshul.g@samsung.com, Thomas Gleixner Date: Thu, 20 Jul 2017 04:52:49 -0700 In-Reply-To: <20170720112449.6xvc2ghaj3jh6w7l@hirez.programming.kicks-ass.net> References: <1422897162-111998-1-git-send-email-aksgarg1989@gmail.com> <20170720112449.6xvc2ghaj3jh6w7l@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 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: 216 Lines: 11 On Thu, 2017-07-20 at 13:24 +0200, Peter Zijlstra wrote: [] > + m = 1UL << ((fls(x) + 1) & ~1UL); maybe #if BITS_PER_LONG == 64 m = 1UL << ((fls64(x) + 1) & ~1UL); #else m = 1UL << ((fls(x) + 1) & ~1UL); #endif