From: Roland Dreier <rdreier@cisco.com>
To: Adrian McMenamin <lkmladrian@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: printk issue - bug?
Date: Sat, 07 Mar 2009 15:52:23 -0800 [thread overview]
Message-ID: <adaab7wgabs.fsf@cisco.com> (raw)
In-Reply-To: <8b67d60903071537p10994257obc7cce99028a740c@mail.gmail.com> (Adrian McMenamin's message of "Sat, 7 Mar 2009 23:37:15 +0000")
> printk("PAGE_SIZE is 0x%X\n", PAGE_SIZE);
> printk("Offset is 0x%X, PAGE_SIZE is 0x%X, readlen is 0x%X\n", offset,
> PAGE_SIZE, readlen)
>
> Output is:
>
> [ 162.603348] PAGE_SIZE is 0x1000
> [ 162.607473] Offset is 0x0, PAGE_SIZE is 0x0, readlen is 0x1000
>
> ie PAGE_SIZE is incorrectly reported in the second printk (these are
> consecutive lines of code)
>
> offset is loff_t and readlen is unsigned long.
ie offset is a 64-bit type but the printk format for it is %x, which
presumably only consumes 32 bits on SH4? Seems like your code is buggy
and you ignored a compiler warning about printk format mismatch?
- R.
next prev parent reply other threads:[~2009-03-07 23:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-07 23:37 printk issue - bug? Adrian McMenamin
2009-03-07 23:52 ` Roland Dreier [this message]
2009-03-08 1:04 ` Adrian McMenamin
2009-03-08 2:20 ` Robert Hancock
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=adaab7wgabs.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkmladrian@gmail.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