lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1305271427320.4220@ionos>
Date:	Mon, 27 May 2013 14:28:39 +0200 (CEST)
From:	Thomas Gleixner <tglx@...utronix.de>
To:	Linus Walleij <linus.walleij@...aro.org>
cc:	Daniel Tang <dt.tangr@...il.com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux@....linux.org.uk ARM Linux" <linux@....linux.org.uk>,
	Arnd Bergmann <arnd@...db.de>,
	"fabian@...ter-vogt.de Vogt" <fabian@...ter-vogt.de>,
	Lionel Debroux <lionel_debroux@...oo.fr>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	John Stultz <john.stultz@...aro.org>
Subject: Re: [RFC PATCHv4 4/6] clocksource: TI-Nspire timer support

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ