public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	linux-kernel@vger.kernel.org, "Ingo Molnar" <mingo@elte.hu>,
	"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
	"Luming Yu" <luming.yu@gmail.com>
Subject: Re: [PATCH 1/2] hrtimer: correct a few numbers in comments and printk outputs
Date: Wed, 25 Nov 2009 23:07:20 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.00.0911252304480.24119@localhost.localdomain> (raw)
In-Reply-To: <20091125131802.e8044b9a.akpm@linux-foundation.org>

On Wed, 25 Nov 2009, Andrew Morton wrote:
> On Wed, 25 Nov 2009 21:18:39 +0100 (CET)
> Thomas Gleixner <tglx@linutronix.de> 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

      reply	other threads:[~2009-11-25 22:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20 19:23 [PATCH 1/2] hrtimer: correct a few numbers in comments and printk outputs Uwe Kleine-König
2009-11-20 19:23 ` [PATCH 2/2] clockevents: assert min_delta_ns being increased in error path Uwe Kleine-König
2009-11-23 23:25 ` [PATCH 1/2] hrtimer: correct a few numbers in comments and printk outputs Andrew Morton
2009-11-24 10:14   ` Uwe Kleine-König
2009-11-25 19:56     ` Andrew Morton
2009-11-25 20:18       ` Thomas Gleixner
2009-11-25 21:18         ` Andrew Morton
2009-11-25 22:07           ` Thomas Gleixner [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=alpine.LFD.2.00.0911252304480.24119@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luming.yu@gmail.com \
    --cc=mingo@elte.hu \
    --cc=u.kleine-koenig@pengutronix.de \
    /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