All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH v2 21/40] clocksource: sh_cmt: Request IRQ for clock event device only
Date: Sun, 02 Mar 2014 20:35:28 +0000	[thread overview]
Message-ID: <3258448.OkuRkXDiH4@avalon> (raw)
In-Reply-To: <1393603090-23144-22-git-send-email-laurent.pinchart+renesas@ideasonboard.com>

Hi Geert,

On Saturday 01 March 2014 18:46:46 Geert Uytterhoeven wrote:
> On Fri, Feb 28, 2014 at 4:57 PM, Laurent Pinchart wrote:
> > --- a/drivers/clocksource/sh_cmt.c
> > +++ b/drivers/clocksource/sh_cmt.c
> > @@ -789,6 +789,8 @@ static void sh_cmt_register_clockevent(struct
> > sh_cmt_channel *ch,> 
> >                                        const char *name)
> >  {
> >         struct clock_event_device *ced = &ch->ced;
> > +       int irq;
> > +       int ret;
> > 
> >         ced->name = name;
> >         ced->features = CLOCK_EVT_FEAT_PERIODIC;
> > @@ -803,6 +805,20 @@ static void sh_cmt_register_clockevent(struct
> > sh_cmt_channel *ch,> 
> >         dev_info(&ch->cmt->pdev->dev, "ch%u: used for clock events\n",
> >                  ch->index);
> >         
> >         clockevents_register_device(ced);
> > +
> > +       irq = platform_get_irq(ch->cmt->pdev, ch->cmt->legacy ? 0 :
> > ch->index);
> > +       if (irq < 0) {
> > +               dev_err(&ch->cmt->pdev->dev, "ch%u: failed to get irq\n",
> > +                       ch->index);
> > +               return;
> 
> So the failure is no longer passed upstream, as sh_cmt_register_clockevent()
> returns void. Can you please change it to return the error code?

Sure, I'll fix that for v3.

> Interestingly, its caller (sh_cmt_register()) does return an error code,
> but currently this is hardcoded to zero.
> And the caller of sh_cmt_register() already checks for an error code.
> 
> > +       }
> > +
> > +       ret = request_irq(irq, sh_cmt_interrupt,
> > +                         IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
> > +                         dev_name(&ch->cmt->pdev->dev), ch);
> > +       if (ret)
> > +               dev_err(&ch->cmt->pdev->dev, "ch%u: failed to request irq
> > %d\n", +                       ch->index, irq);
> > 
> >  }

-- 
Regards,

Laurent Pinchart


      parent reply	other threads:[~2014-03-02 20:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28 15:57 [PATCH v2 21/40] clocksource: sh_cmt: Request IRQ for clock event device only Laurent Pinchart
2014-03-01 17:46 ` Geert Uytterhoeven
2014-03-02 20:35 ` 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=3258448.OkuRkXDiH4@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-sh@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.