lkml.org 
[lkml]   [2007]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch -mm 10/28] highres: Improve debug output
From
Date
On Mon, 2007-06-25 at 17:14 -0700, Andrew Morton wrote:
> On Sat, 23 Jun 2007 13:32:35 -0000
> Thomas Gleixner <tglx@linutronix.de> wrote:
>
> > if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT) ||
> > - !tick_device_is_functional(dev))
> > + !tick_device_is_functional(dev)) {
> > +
> > + printk(KERN_INFO "Clockevents: "
> > + "could not switch to one-shot mode:");
> > + if (!dev) {
> > + printk(" no tick device\n");
> > + } else {
> > + if (!tick_device_is_functional(dev))
> > + printk(" %s is not functional.\n", dev->name);
> > + else if (!(dev->features & CLOCK_EVT_FEAT_ONESHOT))
> > + printk(" %s does not support one-shot mode.\n",
> > + dev->name);
> > + }
>
> There is a logic path through here where the printk doesn't get its \n
> termination? And it will fail to print the reason for the failure, too.
>
> Maybe that's a can't-happen, in which case the CLOCK_EVT_FEAT_ONESHOT test
> is superfluous?

Right, the "else if (...)" test is bogus. A simple "else" is sufficient.

tglx


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

\
 
 \ /
  Last update: 2007-06-26 14:19    [W:0.080 / U:1.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site