From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754202AbaACXj7 (ORCPT ); Fri, 3 Jan 2014 18:39:59 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:54177 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753841AbaACXj4 (ORCPT ); Fri, 3 Jan 2014 18:39:56 -0500 Date: Fri, 3 Jan 2014 15:08:26 -0800 From: Dmitry Torokhov To: "Li.Xiubo@freescale.com" Cc: "thierry.reding@gmail.com" , "bpringlemeir@nbsps.com" , "linux-pwm@vger.kernel.org" , "grant.likely@linaro.org" , "rob.herring@calxeda.com" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Huan Wang , Jingchang Lu Subject: Re: [PATCHv8 RFC] pwm: Add Freescale FTM PWM driver support Message-ID: <20140103230826.GB13489@core.coreip.homeip.net> References: <1388726661-3391-1-git-send-email-Li.Xiubo@freescale.com> <20140103074511.GA10680@core.coreip.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 03, 2014 at 09:16:06AM +0000, Li.Xiubo@freescale.com wrote: > Hi Dmitry, > > > Subject: Re: [PATCHv8 RFC] pwm: Add Freescale FTM PWM driver support > > > > Hi Xiubo, > > > > On Fri, Jan 03, 2014 at 01:24:21PM +0800, Xiubo Li wrote: > > > + > > > +static inline int fsl_pwm_calculate_default_ps(struct fsl_pwm_chip *fpc, > > > + enum fsl_pwm_clk index) > > > +{ > > > > Why do you declare this (and other module-local) function as inline? > > It is usually better let compiler decide if given function should be > > inlined or not. > > > > Could the compiler know when the given function should be inlined by > not declare it? Yes. > And when will be inlined ? When it makes sense to do so from compiler's point of view: i.e. it is smallish or with single call site and there are enough registers, etc, etc. Thanks. -- Dmitry