Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754750AbdLTJf6 (ORCPT ); Wed, 20 Dec 2017 04:35:58 -0500 Received: from mail-lf0-f42.google.com ([209.85.215.42]:46808 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754557AbdLTJfx (ORCPT ); Wed, 20 Dec 2017 04:35:53 -0500 X-Google-Smtp-Source: ACJfBosTpsLf2EHWIgjytyMmAK/yODppeOXI5aQn+dMbqyOYxUrh/l5u4OtRMwOaa22r7ICTEUx349YYQkzkApjV1IU= MIME-Version: 1.0 In-Reply-To: <1513700059.1234.42.camel@perches.com> References: <20171219155908.29528-1-cmo@melexis.com> <1513699793.1234.41.camel@perches.com> <20171219161245.cbjmod7ak5scio7d@hirez.programming.kicks-ass.net> <1513700059.1234.42.camel@perches.com> From: Crt Mori Date: Wed, 20 Dec 2017 10:35:11 +0100 Message-ID: Subject: Re: [PATCH v7 1/3] lib: Add strongly typed 64bit int_sqrt To: Joe Perches Cc: Peter Zijlstra , 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 491 Lines: 18 Thanks for suggestions and comments. Respinned v9 with them. On 19 December 2017 at 17:14, Joe Perches wrote: > 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); >> }