All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: David Miller <davem@davemloft.net>
Cc: harvey.harrison@gmail.com, netdev@vger.kernel.org
Subject: Re: oh crap...
Date: Wed, 29 Oct 2008 12:13:34 -0700	[thread overview]
Message-ID: <1225307615.5269.379.camel@localhost> (raw)
In-Reply-To: <20081029.113142.135680097.davem@davemloft.net>

On Wed, 2008-10-29 at 11:31 -0700, David Miller wrote:
> From: Joe Perches <joe@perches.com>
> Date: Wed, 29 Oct 2008 11:16:54 -0700
> > On Wed, 2008-10-29 at 10:24 -0700, Harvey Harrison wrote:
> > > Putting a modifier after the format specifier seems a little strange to me.
> > Harvey, please remember the whole %p<foo> concept is based on
> > modifier after format specifier.
> I don't think there is any such strict rule, or even that we'd
> want to enforce that.

Of course there's a strict rule.

"%<flags>p" is a normal format conversion specifier.
It takes a pointer as its argument.
Character(s) immediately after the pointer conversion
specifier "p" may be linux-specific format modifiers.

> There is nothing wrong with saying something like %pI6 where
> the "I" signifies "internet address in 'natural' form" and
> "6" is the 'modifier' which you love so much which means
> "oh btw, it's ipv6"

True enough.  6 and I6 are both modifiers.

I have been doodling with sparse to verify the pointer types.
I just want a simple rule: char after "%<flag>p" specifies pointer type.

Ideally it would be:

4: __be32 *
6: struct in6_addr *
R: struct resource *
M: char *

cheers, Joe


  reply	other threads:[~2008-10-29 19:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29  8:54 oh crap... (re: %p6) David Miller
2008-10-29 14:55 ` Harvey Harrison
2008-10-29 15:39   ` Joe Perches
2008-10-29 17:24     ` Harvey Harrison
2008-10-29 18:16       ` Joe Perches
2008-10-29 18:21         ` Harvey Harrison
2008-10-29 18:32           ` oh crap David Miller
2008-10-29 18:31         ` David Miller
2008-10-29 19:13           ` Joe Perches [this message]
2008-10-29 18:28       ` David Miller
2008-10-29 18:31         ` Harvey Harrison

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=1225307615.5269.379.camel@localhost \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=harvey.harrison@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.