linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tglx@linutronix.de (Thomas Gleixner)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCHv4 4/6] clocksource: TI-Nspire timer support
Date: Mon, 27 May 2013 14:28:39 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1305271427320.4220@ionos> (raw)
In-Reply-To: <CACRpkda4Qe1e+dkcSgPLf5dcHASvOG=Y=Dvrnv=oGnon+FRzzg@mail.gmail.com>

On Mon, 27 May 2013, Linus Walleij wrote:
> > +static void zevio_timer_set_mode(enum clock_event_mode mode,
> > +               struct clock_event_device *dev)
> > +{
> > +       unsigned long flags;
> > +       struct zevio_timer *timer = container_of(dev,
> > +                       struct zevio_timer,
> > +                       clkevt);
> > +
> > +       local_irq_save(flags);
> > +
> > +       switch (mode) {
> > +       case CLOCK_EVT_MODE_PERIODIC:
> > +               /* Unsupported */
> > +               break;
> > +       case CLOCK_EVT_MODE_RESUME:
> > +       case CLOCK_EVT_MODE_ONESHOT:
> > +               /* Enable timer interrupts */
> > +               writel(TIMER_INTR_MSK, timer->interrupt_regs + IO_INTR_MSK);
> > +               writel(TIMER_INTR_ALL, timer->interrupt_regs + IO_INTR_ACK);
> > +               dev->mode = mode;
> > +               break;
> > +       case CLOCK_EVT_MODE_SHUTDOWN:
> > +       case CLOCK_EVT_MODE_UNUSED:
> > +               /* Disable timer interrupts */
> > +               writel(0, timer->interrupt_regs + IO_INTR_MSK);
> > +               writel(TIMER_INTR_ALL, timer->interrupt_regs + IO_INTR_ACK);
> > +               /* Stop timer */
> > +               writel(CNTL_STOP_TIMER, timer->timer1 + IO_CONTROL);
> > +               dev->mode = mode;
> > +               break;
> > +       }
> 
> Surely both the compiler and checkpatch is complaining that this
> switch does not contain a default: clause?

Well, if you have a switch with an enum, the compiler complains if you
do not have a case for each enum value and the above has all enum
values covered AFAICT. :)

Thanks,

	tglx

  parent reply	other threads:[~2013-05-27 12:28 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-25 11:08 [RFC PATCHv4 0/6] arm: Initial TI-Nspire support Daniel Tang
2013-05-25 11:08 ` [RFC PATCHv4 1/6] arm: TI-Nspire platform code Daniel Tang
2013-05-26 20:46   ` Arnd Bergmann
2013-05-27  4:07     ` Daniel Tang
2013-05-27  6:56       ` Arnd Bergmann
     [not found]         ` <CAPnH9dnA22C3ZS9jgJNytnmKM_8Vfk7OxNRB1Mg03=q7KhHZBA@mail.gmail.com>
     [not found]           ` <201305271715.02385.arnd@arndb.de>
2013-05-29  5:14             ` Daniel Tang
2013-05-29  7:58               ` Arnd Bergmann
2013-05-25 11:08 ` [RFC PATCHv4 2/6] arm: TI-Nspire device trees Daniel Tang
2013-05-25 11:08 ` [RFC PATCHv4 3/6] clk: TI-Nspire clock drivers Daniel Tang
2013-05-31  1:16   ` Mike Turquette
2013-05-25 11:08 ` [RFC PATCHv4 4/6] clocksource: TI-Nspire timer support Daniel Tang
2013-05-27 10:53   ` Linus Walleij
2013-05-27 10:56     ` Daniel Tang
2013-05-27 12:28     ` Thomas Gleixner [this message]
2013-05-25 11:08 ` [RFC PATCHv4 5/6] input: TI-Nspire keypad support Daniel Tang
2013-05-25 11:08 ` [RFC PATCHv4 6/6] irqchip: TI-Nspire irqchip support Daniel Tang
2013-05-30 21:29   ` Grant Likely
2013-05-26 21:23 ` [RFC PATCHv4 0/6] arm: Initial TI-Nspire support Arnd Bergmann
2013-05-27  2:23   ` Daniel Tang
2013-05-27 10:31     ` Arnd Bergmann
2013-05-28 10:52       ` Pawel Moll
2013-05-31  7:43         ` Laurent Pinchart
2013-05-29  5:18       ` Daniel Tang
2013-05-29 12:46         ` Arnd Bergmann
2013-05-27 10:32     ` Arnd Bergmann
2013-05-28 10:54       ` Pawel Moll
2013-05-28 14:16         ` Linus Walleij
2013-05-28 14:21           ` Pawel Moll
2013-05-28 14:52             ` Arnd Bergmann
2013-05-28 15:10               ` Andy Shevchenko

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=alpine.LFD.2.02.1305271427320.4220@ionos \
    --to=tglx@linutronix.de \
    --cc=linux-arm-kernel@lists.infradead.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 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).