From: Randy Dunlap <randy.dunlap@oracle.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, tklauser@distanz.ch
Subject: [PATCH v2] docbook: fix printk of ip address
Date: Thu, 30 Jul 2009 12:37:46 -0700 [thread overview]
Message-ID: <20090730123746.1fe58340.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20090730.123151.191002348.davem@davemloft.net>
From: Tobias Klauser <tklauser@distanz.ch>
Use the %pI4 format string instead of %d.%d.%d.%d and NIPQUAD.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
Documentation/DocBook/kernel-hacking.tmpl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-2.6.31-rc4-git3.orig/Documentation/DocBook/kernel-hacking.tmpl
+++ linux-2.6.31-rc4-git3/Documentation/DocBook/kernel-hacking.tmpl
@@ -449,8 +449,8 @@ printk(KERN_INFO "i = %u\n", i);
</para>
<programlisting>
-__u32 ipaddress;
-printk(KERN_INFO "my ip: %d.%d.%d.%d\n", NIPQUAD(ipaddress));
+__be32 ipaddress;
+printk(KERN_INFO "my ip: %pI4\n", &ipaddress);
</programlisting>
<para>
---
~Randy
LPC 2009, Sept. 23-25, Portland, Oregon
http://linuxplumbersconf.org/2009/
next prev parent reply other threads:[~2009-07-30 19:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-30 19:25 [PATCH] docbook: fix printk of ip address Randy Dunlap
2009-07-30 19:31 ` David Miller
2009-07-30 19:37 ` Randy Dunlap [this message]
2009-07-30 20:10 ` [PATCH v2] " David Miller
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=20090730123746.1fe58340.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=tklauser@distanz.ch \
/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).