From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [PATCHv8 RFC] pwm: Add Freescale FTM PWM driver support Date: Fri, 3 Jan 2014 15:08:26 -0800 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-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org To: "Li.Xiubo@freescale.com" Cc: "linux-pwm@vger.kernel.org" , "bpringlemeir@nbsps.com" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "rob.herring@calxeda.com" , "thierry.reding@gmail.com" , Jingchang Lu , "grant.likely@linaro.org" , Huan Wang , "linux-arm-kernel@lists.infradead.org" List-Id: devicetree@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