From: Joe Perches <joe@perches.com>
To: David Laight <David.Laight@ACULAB.COM>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>,
Andrew Morton <akpm@linux-foundation.org>,
Grant Likely <grant.likely@secretlab.ca>,
David Miller <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] vsprintf: Remove SPECIAL from pointer types
Date: Mon, 07 Jul 2014 06:26:17 -0700 [thread overview]
Message-ID: <1404739577.27043.65.camel@joe-AO725> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1726D4E1@AcuExch.aculab.com>
On Mon, 2014-07-07 at 08:26 +0000, David Laight wrote:
> From: Joe Perches
> > Because gcc issues a complaint about any pointer format with %#p,
> > remove the use of SPECIAL to prefix 0x to various pointer types.
> >
> > There are no uses in the kernel tree of %#p.
>
> I know you guys don't really care about them, but there might
> be uses in out of tree drivers.
>
> With the change what is output for %#p ?
Linux's output of %#p for normal, non %p<foo> extension use,
continues to be prefixed with 0x and zero filled.
Prior to this proposed change:
%#p uses a fixed width of sizeof(void *) * 2 + 2.
%p uses a fixed with of sizeof(void *) * 2
Post:
%#p uses a variable width of the minimum of sizeof(void *) * 2
to sizeof(void *) * 2 + 2 depending on the high order 2 bytes
of the pointer value.
There is no in-kernel tree code that uses %#p so it
has no net effect.
Personally, I prefer %#p uses the "+ 2" fixed width.
The real benefit is removing the auto-prefixing of 0x
when using the %pa extension to be consistent with
other naked pointer output types.
next prev parent reply other threads:[~2014-07-07 13:26 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-29 2:10 [PATCH v2] declance: Fix 64-bit compilation warnings Maciej W. Rozycki
2014-07-03 1:28 ` David Miller
2014-07-03 2:29 ` Maciej W. Rozycki
2014-07-03 2:34 ` Maciej W. Rozycki
2014-07-03 3:05 ` Joe Perches
2014-07-03 4:51 ` Maciej W. Rozycki
2014-07-03 5:16 ` Joe Perches
2014-07-03 6:01 ` Maciej W. Rozycki
2014-07-03 6:25 ` Joe Perches
2014-07-03 16:57 ` Grant Likely
2014-07-05 14:56 ` Maciej W. Rozycki
2014-07-05 16:07 ` Joe Perches
2014-07-05 17:39 ` Maciej W. Rozycki
2014-07-05 18:08 ` Joe Perches
2014-07-05 18:20 ` Maciej W. Rozycki
2014-07-05 18:31 ` Joe Perches
2014-07-05 20:25 ` Maciej W. Rozycki
2014-07-05 20:45 ` [PATCH] vsprintf: Remove SPECIAL from pointer types Joe Perches
2014-07-06 11:44 ` Maciej W. Rozycki
2014-07-06 14:32 ` Joe Perches
2014-07-07 8:26 ` David Laight
2014-07-07 13:26 ` Joe Perches [this message]
2014-07-07 12:01 ` [PATCH v2] declance: Fix 64-bit compilation warnings Grant Likely
2014-07-07 12:18 ` Maciej W. Rozycki
2014-07-07 13:40 ` Joe Perches
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=1404739577.27043.65.camel@joe-AO725 \
--to=joe@perches.com \
--cc=David.Laight@ACULAB.COM \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).