Re: [PATCH 1/2] hrtimer: correct a few numbers in comments and printkoutputs

From: Thomas Gleixner
Date: Wed Nov 25 2009 - 17:08:42 EST


On Wed, 25 Nov 2009, Andrew Morton wrote:
> On Wed, 25 Nov 2009 21:18:39 +0100 (CET)
> Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> > > > > @@ -50,9 +50,9 @@ int tick_dev_program_event(struct clock_
> > > > > dev->min_delta_ns += dev->min_delta_ns >> 1;
> > > > >
> > > > > printk(KERN_WARNING
> > > > > - "CE: %s increasing min_delta_ns to %lu nsec\n",
> > > > > + "CE: %s increasing min_delta_ns to %llu nsec\n",
> > > > > dev->name ? dev->name : "?",
> > > > > - dev->min_delta_ns << 1);
> > > > > + (unsigned long long) dev->min_delta_ns << 1);
> > > > '<< 1' is wrong here, too.
> > > >
> > >
> > > What's wrong with it? That leftshift appears to be to compensate for
> > > the rightshift a few lines above.
> > >
> > > That change was unobvious and unchangelogged, so here we are again.
> >
> > That's actually my fault. In commit 61c22c34 I removed the WARN_ON
> > which we put there to gather data on kerneloops.org for a while and
> > did not fix the printk format string.
> >
>
> The issue is not the format string. I'm wondering why Uwe removed that
> left-shift of dev->min_delta_ns.

Sorry, I'm confused: I did not fix the argument. The printk was
actually before the code which adjusted the min_delta_ns in the old
WARN_ON case. When I removed the WARN_ON I moved the printk down and
kept the << 1 which is crap. We want to print the new value not the
double of it.

Thanks,

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