"__be32 s_addr" ? (was Re: [PATCH] procfs: Fix sparse warnings)

From: Alexey Dobriyan
Date: Wed Feb 16 2005 - 04:29:25 EST


On Wednesday 16 February 2005 10:35, Al Viro wrote:

> Most of the mess is in drivers/*, arch/* and (for endianness patches) net/*...

Yes, net/*. Many do X.s_addr = htonl(blah). Is this correct?

--- a/include/linux/in.h
+++ b/include/linux/in.h
@@ -51,7 +51,7 @@ enum {

/* Internet address. */
struct in_addr {
- __u32 s_addr;
+ __be32 s_addr;
};

#define IP_TOS 1

It gives approximately "486 insertions(+), 183 deletions(-)" between two
logs without and with this change (adds more then removes as is).

Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/