From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751354AbdLSQND (ORCPT ); Tue, 19 Dec 2017 11:13:03 -0500 Received: from merlin.infradead.org ([205.233.59.134]:57970 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751107AbdLSQNB (ORCPT ); Tue, 19 Dec 2017 11:13:01 -0500 Date: Tue, 19 Dec 2017 17:12:45 +0100 From: Peter Zijlstra To: Joe Perches 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 Subject: Re: [PATCH v7 1/3] lib: Add strongly typed 64bit int_sqrt Message-ID: <20171219161245.cbjmod7ak5scio7d@hirez.programming.kicks-ass.net> References: <20171219155908.29528-1-cmo@melexis.com> <1513699793.1234.41.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1513699793.1234.41.camel@perches.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? static inline u32 int_sqrt64(u64 x) { return int_sqrt(x); }