From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
linux-sh@vger.kernel.org, Magnus Damm <magnus.damm@gmail.com>,
linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
John Stultz <john.stultz@linaro.org>
Subject: Re: [PATCH] clocksource: sh_cmt: Use devm_* managed helpers
Date: Tue, 18 Jun 2013 12:31:58 +0000 [thread overview]
Message-ID: <2566074.m8COktZgTy@avalon> (raw)
In-Reply-To: <CAK9yfHwq_OC6s5Lvh6j5RP5xCTzgkWxFLrUq7_5i_7gPfCDTXQ@mail.gmail.com>
Hi Sachin,
On Tuesday 18 June 2013 17:13:37 Sachin Kamat wrote:
> On 18 June 2013 16:29, Laurent Pinchart wrote:
> > This simplifies the main error path by getting rid of it.
> >
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> >
> > drivers/clocksource/sh_cmt.c | 40 ++++++++++++++-------------------------
> > 1 file changed, 14 insertions(+), 26 deletions(-)
> >
> > The patch is based on top of renesas-next-20130618 plus Magnus'
> > "clocksource: sh_cmt: 32-bit control register support" patch.
> >
> > diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
> > index 0965e98..7001e4d 100644
> > --- a/drivers/clocksource/sh_cmt.c
> > +++ b/drivers/clocksource/sh_cmt.c
[snip]
> > @@ -703,23 +701,23 @@ static int sh_cmt_setup(struct sh_cmt_priv *p,
> > struct platform_device *pdev)>
> > irq = platform_get_irq(p->pdev, 0);
> > if (irq < 0) {
> > dev_err(&p->pdev->dev, "failed to get irq\n");
> > - goto err0;
> > + return -ENXIO;
> > }
> >
> > /* map memory, let mapbase point to our channel */
> > - p->mapbase = ioremap_nocache(res->start, resource_size(res));
> > + p->mapbase = devm_ioremap_resource(&pdev->dev, res);
> > if (p->mapbase = NULL) {
>
> You should check for IS_ERR (p->mapbase) and return PTR_ERR(p->mapbase)
>
> > dev_err(&p->pdev->dev, "failed to remap I/O memory\n");
>
> This error message is not required as devm_ioremap_resource prints its own.
Oops, my bad. I'll fix that and resubmit.
--
Regards,
Laurent Pinchart
prev parent reply other threads:[~2013-06-18 12:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-18 10:59 [PATCH] clocksource: sh_cmt: Use devm_* managed helpers Laurent Pinchart
2013-06-18 11:55 ` Sachin Kamat
2013-06-18 12:31 ` Laurent Pinchart [this message]
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=2566074.m8COktZgTy@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=john.stultz@linaro.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=sachin.kamat@linaro.org \
--cc=tglx@linutronix.de \
/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