[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <757a6b34dce3b030726c8c1d06123ec187114b28.1260949674.git.joe@perches.com>
Date: Wed, 16 Dec 2009 00:09:06 -0800
From: Joe Perches <joe@...ches.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH 07/14] kernel.h: Move NIPQUAD and NIPQUAD_FMT to in.h
Move the #defines to where they're actually useful.
All the current uses of NIPQUAD still compile successfully.
Signed-off-by: Joe Perches <joe@...ches.com>
---
include/linux/in.h | 11 +++++++++++
include/linux/kernel.h | 11 -----------
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/linux/in.h b/include/linux/in.h
index b615649..4e0f177 100644
--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -247,6 +247,17 @@ struct sockaddr_in {
#ifdef __KERNEL__
+/*
+ * Display an IP address in readable format.
+ */
+
+#define NIPQUAD(addr) \
+ ((unsigned char *)&addr)[0], \
+ ((unsigned char *)&addr)[1], \
+ ((unsigned char *)&addr)[2], \
+ ((unsigned char *)&addr)[3]
+#define NIPQUAD_FMT "%u.%u.%u.%u"
+
static inline bool ipv4_is_loopback(__be32 addr)
{
return (addr & htonl(0xff000000)) == htonl(0x7f000000);
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index f7144b1..1764d2d 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -240,17 +240,6 @@ static inline char *pack_hex_byte(char *buf, u8 byte)
}
/*
- * Display an IP address in readable format.
- */
-
-#define NIPQUAD(addr) \
- ((unsigned char *)&addr)[0], \
- ((unsigned char *)&addr)[1], \
- ((unsigned char *)&addr)[2], \
- ((unsigned char *)&addr)[3]
-#define NIPQUAD_FMT "%u.%u.%u.%u"
-
-/*
* min()/max()/clamp() macros that also do
* strict type-checking.. See the
* "unnecessary" pointer comparison.
--
1.6.6.rc0.57.gad7a
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists