public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>, Ingo Molnar <mingo@elte.hu>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: printk %0*X is broken.
Date: Wed, 06 May 2009 00:06:28 -0700	[thread overview]
Message-ID: <4A0136F4.4010504@kernel.org> (raw)

it seems someone broke 

printk(   "%0*X\n", width, x);

looks like 0 is dumped.

YH

[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 base 0   00000000 mask FF0 00000000 write-back
[    0.000000]   1 base 10  00000000 mask FFF 80000000 write-back
[    0.000000]   2 base 0   80000000 mask FFF 80000000 uncachable
[    0.000000]   3 base 0   7F800000 mask FFF FF800000 uncachable


code:
        for (i = 0; i < num_var_ranges; ++i) {
                if (mtrr_state.var_ranges[i].mask_lo & (1 << 11))
                        printk(KERN_DEBUG "  %u base %0*X%05X000 mask %0*X%05X000 %s\n",
                               i,
                               high_width,
                               mtrr_state.var_ranges[i].base_hi,
                               mtrr_state.var_ranges[i].base_lo >> 12,
                               high_width,
                               mtrr_state.var_ranges[i].mask_hi,
                               mtrr_state.var_ranges[i].mask_lo >> 12,
                               mtrr_attrib_to_str(mtrr_state.var_ranges[i].base_lo & 0xff));
                else
                        printk(KERN_DEBUG "  %u disabled\n", i);
        }



             reply	other threads:[~2009-05-06  7:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-06  7:06 Yinghai Lu [this message]
2009-05-06  7:18 ` printk %0*X is broken 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
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=4A0136F4.4010504@kernel.org \
    --to=yinghai@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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