Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751470AbdLSQO1 (ORCPT ); Tue, 19 Dec 2017 11:14:27 -0500 Received: from smtprelay0043.hostedemail.com ([216.40.44.43]:35300 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750801AbdLSQOZ (ORCPT ); Tue, 19 Dec 2017 11:14:25 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1537:1567:1593:1594:1711:1714:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3622:3867:3873:4321:5007:6742:7904:10004:10400:10848:11232:11658:11914:12740:12760:12895:13069:13311:13357:13439:14659:14721:21080:21451:21627:30054:30090: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:2,LUA_SUMMARY:none X-HE-Tag: ant09_8f0d4acb7f4c X-Filterd-Recvd-Size: 1708 Message-ID: <1513700059.1234.42.camel@perches.com> Subject: Re: [PATCH v7 1/3] lib: Add strongly typed 64bit int_sqrt From: Joe Perches To: Peter Zijlstra Cc: Crt Mori , Jonathan Cameron , Ingo Molnar , Andrew Morton , Kees Cook , Rusty Russell , Ian Abbott , Larry Finger , Niklas Soderlund , Thomas Gleixner , Krzysztof Kozlowski , Masahiro Yamada , linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org Date: Tue, 19 Dec 2017 08:14:19 -0800 In-Reply-To: <20171219161245.cbjmod7ak5scio7d@hirez.programming.kicks-ass.net> References: <20171219155908.29528-1-cmo@melexis.com> <1513699793.1234.41.camel@perches.com> <20171219161245.cbjmod7ak5scio7d@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 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: 343 Lines: 15 On Tue, 2017-12-19 at 17:12 +0100, Peter Zijlstra wrote: > On Tue, Dec 19, 2017 at 08:09:53AM -0800, Joe Perches wrote: > > > > I suspect you need to define this as: > > > > #define int_sqrt64(x) ((u32)int_sqrt(x)) > > What's wrong with using C ? Duh. Nothing at all. > static inline u32 int_sqrt64(u64 x) > { > return int_sqrt(x); > }