[PATCHv8 RFC] pwm: Add Freescale FTM PWM driver support
Li.Xiubo at freescale.com
Li.Xiubo at freescale.com
Mon Jan 6 00:25:32 EST 2014
> > > > +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.
>
Well, the inline is not very useful here, I will revise this.
Thanks,
--
Best Regards,
Xiubo
More information about the linux-arm-kernel
mailing list