From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752374AbbCMIxQ (ORCPT ); Fri, 13 Mar 2015 04:53:16 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:46024 "EHLO mail-lb0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752038AbbCMIxL (ORCPT ); Fri, 13 Mar 2015 04:53:11 -0400 From: Rasmus Villemoes To: Bartosz Golaszewski Cc: LKML , Guenter Roeck , lm-sensors , Andrew Morton , Steven Rostedt Subject: Re: [PATCH v2 3/4] hwmon: (lm85) replace x_TO_REG() functions with find_closest() Organization: D03 References: <1426008442-26236-1-git-send-email-bgolaszewski@baylibre.com> <1426008442-26236-4-git-send-email-bgolaszewski@baylibre.com> X-Hashcash: 1:20:150313:akpm@linux-foundation.org::t6SJZp5cumrvssPH:00000000000000000000000000000000000003DL X-Hashcash: 1:20:150313:linux-kernel@vger.kernel.org::ns9rBN1FVPaiNl1T:0000000000000000000000000000000002NPZ X-Hashcash: 1:20:150313:linux@roeck-us.net::Hqsdc7C3blHN8JJ/:00000000000000000000000000000000000000000002/2u X-Hashcash: 1:20:150313:lm-sensors@lm-sensors.org::rht7HgIVWLfwWlfr:0000000000000000000000000000000000006BMB X-Hashcash: 1:20:150313:srostedt@redhat.com::6Pj746QNCOH/tvhc:0000000000000000000000000000000000000000004ujM X-Hashcash: 1:20:150313:bgolaszewski@baylibre.com::lFBoxGYGwdGtYrJZ:000000000000000000000000000000000000BXDD Date: Fri, 13 Mar 2015 09:53:08 +0100 In-Reply-To: <1426008442-26236-4-git-send-email-bgolaszewski@baylibre.com> (Bartosz Golaszewski's message of "Tue, 10 Mar 2015 18:27:21 +0100") Message-ID: <87fv99cm8b.fsf@rasmusvillemoes.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 10 2015, Bartosz Golaszewski wrote: > Replace RANGE_TO_REG() and FREQ_TO_REG() functions with calls > to find_closest(). > I think the other functions you've replaced only had a single caller, but RANGE_TO_REG is called in two places. It's not a huge function and 2 is not a big number, but maybe it's better to let gcc decide whether to inline the code. So how about leaving the *_TO_REG functions in place and just replace their bodies with the appropriate macro invocation? Rasmus