From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Xiubo Li <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,
Alison Wang <b18965@freescale.com>,
Jingchang Lu <b35083@freescale.com>
Subject: Re: [PATCHv8 RFC] pwm: Add Freescale FTM PWM driver support
Date: Thu, 2 Jan 2014 23:45:11 -0800 [thread overview]
Message-ID: <20140103074511.GA10680@core.coreip.homeip.net> (raw)
In-Reply-To: <1388726661-3391-1-git-send-email-Li.Xiubo@freescale.com>
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.
[...]
> +
> +static int fsl_pwm_remove(struct platform_device *pdev)
> +{
> + struct fsl_pwm_chip *fpc = platform_get_drvdata(pdev);
> +
> + mutex_destroy(&fpc->lock);
> +
> + return pwmchip_remove(&fpc->chip);
fpc->lock will be used while pwmchip_remove() is running so you should
not be destroying it before calling pwmchip_remove(). It should probbaly
go into free() method or just drop it altogether.
Thanks.
--
Dmitry
next prev parent reply other threads:[~2014-01-03 7:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-03 5:24 [PATCHv8 RFC] pwm: Add Freescale FTM PWM driver support Xiubo Li
2014-01-03 7:45 ` Dmitry Torokhov [this message]
[not found] ` <20140103074511.GA10680-WlK9ik9hQGAhIp7JRqBPierSzoNAToWh@public.gmane.org>
2014-01-03 9:16 ` Li.Xiubo-KZfg59tc24xl57MIdRCFDg
2014-01-03 23:08 ` Dmitry Torokhov
2014-01-06 5:25 ` Li.Xiubo
2014-01-08 16:36 ` Bill Pringlemeir
2014-01-09 7:57 ` Li.Xiubo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140103074511.GA10680@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=Li.Xiubo@freescale.com \
--cc=b18965@freescale.com \
--cc=b35083@freescale.com \
--cc=bpringlemeir@nbsps.com \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).