From: Vegard Nossum <vegard.nossum@gmail.com>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>, Ingo Molnar <mingo@elte.hu>,
Yinghai Lu <yinghai@kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jeremy Fitzhardinge <jeremy@goop.org>,
Zhaolei <zhaolei@cn.fujitsu.com>,
Steven Rostedt <rostedt@goodmis.org>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: printk %0*X is broken.
Date: Wed, 6 May 2009 11:20:17 +0200 [thread overview]
Message-ID: <19f34abd0905060220l2dc241b2j45e4bd127bacade3@mail.gmail.com> (raw)
In-Reply-To: <4A014BA9.9020201@cn.fujitsu.com>
2009/5/6 Li Zefan <lizf@cn.fujitsu.com>:
>> Vegard Nossum wrote:
>>> 2009/5/6 Ingo Molnar <mingo@elte.hu>:
>>>> Cc:-ed more folks who modified lib/vsprintf.c recently.
>>>>
>>>> Ingo
>>>>
>>>> * Yinghai Lu <yinghai@kernel.org> wrote:
>>>>
>>>>> it seems someone broke
>>>>>
>>>>> printk( "%0*X\n", width, x);
>>>>>
>>>>> looks like 0 is dumped.
>>> After %, we look for flags. The problem is that when a flag is found, we
>>> don't advance in the format string. And thus we start looking for the
>>> precision, which is read as 0, because we are still at the 0. I think
>>> this patch should fix it.
>>>
>
> No, we break out of the while loop when we can't find a flag,
> So we are at '*' after we found '0'.
> Lai Jiangshan wrote:
>> It seems that your patch does not change anything.
>> The code logic is still the same as before.
Oh really? So sorry, I didn't look close enough :-(
Vegard
next prev parent reply other threads:[~2009-05-06 9:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-06 7:06 Yinghai Lu
2009-05-06 7:18 ` Ingo Molnar
2009-05-06 8:00 ` Li Zefan
2009-05-06 8:12 ` Vegard Nossum
2009-05-06 8:27 ` Lai Jiangshan
2009-05-06 8:34 ` Li Zefan
2009-05-06 9:20 ` Vegard Nossum [this message]
2009-05-06 8:30 ` Li Zefan
2009-05-06 16:11 ` Frederic Weisbecker
2009-05-07 4:36 ` [PATCH] x86: fix compute high_width with phys-addr is 44bit and more Yinghai Lu
2009-05-11 9:54 ` [tip:x86/urgent] x86: mtrr: Fix high_width computation when phys-addr is >= 44bit tip-bot for Yinghai Lu
2009-05-06 10:25 ` printk %0*X is broken Frédéric Weisbecker
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=19f34abd0905060220l2dc241b2j45e4bd127bacade3@mail.gmail.com \
--to=vegard.nossum@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=jeremy@goop.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lizf@cn.fujitsu.com \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=yinghai@kernel.org \
--cc=zhaolei@cn.fujitsu.com \
/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
all inboxes | Powered by JetHome®