mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
To: Gerd Knorr <kraxel@bytesex.org>
Cc: "Randy.Dunlap" <rddunlap@osdl.org>,
	jelle@foks.8m.com, lkml <linux-kernel@vger.kernel.org>,
	akpm <akpm@osdl.org>
Subject: Re: [PATCH] cx88: fix printk arg. type
Date: Wed, 17 Nov 2004 17:58:11 +0000	[thread overview]
Message-ID: <20041117175811.GE26051@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20041117172519.GB8176@bytesex>

On Wed, Nov 17, 2004 at 06:25:19PM +0100, Gerd Knorr wrote:
> > -		dprintk(0, "ERROR: Firmware size mismatch (have %ld, expected %d)\n",
> > +		dprintk(0, "ERROR: Firmware size mismatch (have %Zd, expected %d)\n",
> 
> Thanks, merged to cvs.  I like that 'Z'.  Or is that just a linux-kernel
> printk specific thingy?  Or is this standardized somewhere?  So I could
> use that in userspace code as well maybe?

'Z' is an obsolete equivalent of standard 'z'.  That one is portable and it
is, indeed, available in userland (libc6 and anything C99-compliant).  To
quote the manpage:

       z      A  following  integer  conversion  corresponds  to  a  size_t or
              ssize_t argument. (Linux libc5 has Z with  this  meaning.  Don't
              use it.)

       t      A  following integer conversion corresponds to a ptrdiff_t argu-
              ment.

Please, do s/Zd/zd/.

One more thing: folks, please stop using crap like "%08x", (int)pointer.
It's not only non-portable (consider 64bit boxen), it's extra work for
no good reason.  "%p" is standard and will do the right thing with less
PITA.

  parent reply	other threads:[~2004-11-17 18:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-16 23:13 Randy.Dunlap
2004-11-17 17:25 ` Gerd Knorr
2004-11-17 17:47   ` Randy.Dunlap
2004-11-17 18:22     ` Gerd Knorr
2004-11-17 19:22     ` Andrew Morton
2004-11-17 19:12       ` Randy.Dunlap
2004-11-17 17:58   ` Al Viro [this message]
2004-11-17 18:21   ` Jelle Foks

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=20041117175811.GE26051@parcelfarce.linux.theplanet.co.uk \
    --to=viro@parcelfarce.linux.theplanet.co.uk \
    --cc=akpm@osdl.org \
    --cc=jelle@foks.8m.com \
    --cc=kraxel@bytesex.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.org \
    /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®