From: Tim Bird <tim.bird@am.sony.com>
To: Andrew Murray <amurray@mpcdata.com>
Cc: "linux-embedded@vger.kernel.org" <linux-embedded@vger.kernel.org>,
linux kernel <linux-kernel@vger.kernel.org>,
"trivial@kernel.org" <trivial@kernel.org>
Subject: Re: [PATCH] printk-formats.txt documentation update
Date: Sat, 5 Feb 2011 16:27:19 -0800 [thread overview]
Message-ID: <4D4DEAE7.1070306@am.sony.com> (raw)
In-Reply-To: <AANLkTikj+FU8OF_-KFr2hmTSWqTHMK5JnrnTVyn-XtxQ@mail.gmail.com>
On 02/05/2011 04:15 PM, Andrew Murray wrote:
> From: Andrew Murray <amurray@mpc-data.co.uk>
>
> This patch updates the incomplete documentation concerning the printk
> extended format specifiers.
>
> Signed-off-by: Andrew Murray <amurray@mpc-data.co.uk>
> ---
> diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt
> index 1b5a5dd..df14336 100644
> --- a/Documentation/printk-formats.txt
> +++ b/Documentation/printk-formats.txt
> @@ -9,7 +9,42 @@ If variable is of Type, use printk format specifier:
> size_t %zu or %zx
> ssize_t %zd or %zx
>
> -Raw pointer value SHOULD be printed with %p.
> +Raw pointer value SHOULD be printed with %p. The kernel supports
> +the following extended format specifiers for pointer types:
> +
> + General:
> +
> + %pF function pointer with offset, e.g. module_start
> + %pf function pointer without offset, e.g. module_start+0x0/0x62 [hello]
> + %pS text symbol with offset
> + %ps text symbol without offset
> + %pR struct resource with decoded flags, e.g. [mem 0x0-0x1f 64 bit pref]
> + %pr struct resource with raw flags, e.g. [mem 0x0-0x1f flags 0x201]
> +
> + MAC/FDDI addresses:
> +
> + %pM colon-seperated 6-byte MAC address in hex notation, e.g. 00:01:02:03:04:05
> + %pm non-colon-seperated 6-byte MAC address is hex notation, e.g. 000102030405
> + %pMF 6-byte dash-separated FDDI hex notation
> +
> + IPv4 addresses:
> +
> + %pI4 IPv4 dot-seperated decimal without leading 0's, e.g. 1.2.3.4
> + %pi4 IPv4 dot-seperated decimal with leading 0's, 001.002.003.004
> + %p[Ii]4[hl] IPv4 dot-seperated decimal with/without leading 0's for
> + host (h), little (l) or network/big (default) endian order
> +
> + IPv6 addresses:
> + %pI6 IPv6 colon-seperated network-order 16 bit hex with leading 0's,
> + e.g. 0001:0203:...:0708
> + %pi6 IPv6 non-colon-seperated network-order 16 bit hex with leading 0's,
> + e.g. 000102...0f
> + %pI6c IPv6 address as described by
> + http://tools.ietf.org/html/draft-ietf-6man-text-addr-representation-00,
> + e.g. 1::708
> +
> + %pU[bBlL] 16 byte UUID/GUID in big or little endian using lower or upper case
> +
>
> u64 SHOULD be printed with %llu/%llx, (unsigned long long):
I like this, as it has information that is not documented elsewhere.
Some feedback on the patch:
Some of these lines are longer than 80 chars. Can you please truncate
things to fit in an 80-column terminal window?
Thanks,
-- Tim
=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Network Entertainment
=============================
next prev parent reply other threads:[~2011-02-06 0:27 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-06 0:15 [PATCH] printk-formats.txt documentation update Andrew Murray
2011-02-06 0:27 ` Tim Bird [this message]
2011-02-06 0:37 ` Joe Perches
2011-02-06 10:07 ` Andrew Murray
2011-02-06 10:16 ` Geert Uytterhoeven
2011-02-06 16:14 ` Andrew Murray
2011-02-06 16:23 ` Andrew Murray
2011-02-07 9:29 ` Wolfram Sang
2011-02-07 18:12 ` Andrew Murray
2011-02-07 19:33 ` Joe Perches
2011-02-11 8:15 ` Andrew Murray
2011-02-11 8:15 ` Andrew Murray
2011-06-09 17:33 ` [PATCH] Revised patch Andrew Murray
2011-06-09 17:40 ` Joe Perches
2011-06-09 17:47 ` Namhyung Kim
2011-06-09 17:47 ` Namhyung Kim
2011-06-09 17:48 ` Andrew Murray
2011-06-09 18:04 ` [PATCH] printk-formats.txt documentation update Andrew Murray
2011-06-09 18:20 ` Namhyung Kim
2011-06-09 18:20 ` Namhyung Kim
2011-06-09 18:55 ` Andrew Murray
2011-06-09 19:45 ` Randy Dunlap
2011-06-09 21:24 ` Andrew Murray
2011-06-09 21:51 ` Randy Dunlap
2011-06-09 22:00 ` Joe Perches
2011-06-09 22:21 ` Andrew Murray
2011-06-09 22:37 ` Randy Dunlap
2011-06-09 22:53 ` Joe Perches
2011-06-09 22:57 ` Randy Dunlap
2011-06-10 17:50 ` Randy Dunlap
2011-06-10 17:56 ` Andrew Murray
2011-06-09 18:23 ` [PATCH] vsprintf: Update %pI6c to not compress a single 0 Joe Perches
2011-06-09 17:47 ` [PATCH] Revised patch Randy Dunlap
2011-06-09 17:53 ` 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=4D4DEAE7.1070306@am.sony.com \
--to=tim.bird@am.sony.com \
--cc=amurray@mpcdata.com \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=trivial@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.