netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 2/4] inet: Define IPV4_DEVCONF_MAX
@ 2010-11-16 14:31 Thomas Graf
  2010-11-17 19:30 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Graf @ 2010-11-16 14:31 UTC (permalink / raw)
  To: davem; +Cc: netdev

Define IPV4_DEVCONF_MAX to get rid of MAX - 1 notation.

Signed-off-by: Thomas Graf <tgraf@infradead.org>

Index: net-next-2.6/include/linux/inetdevice.h
===================================================================
--- net-next-2.6.orig/include/linux/inetdevice.h
+++ net-next-2.6/include/linux/inetdevice.h
@@ -41,10 +41,12 @@ enum
 	__IPV4_DEVCONF_MAX
 };
 
+#define IPV4_DEVCONF_MAX (__IPV4_DEVCONF_MAX - 1)
+
 struct ipv4_devconf {
 	void	*sysctl;
-	int	data[__IPV4_DEVCONF_MAX - 1];
-	DECLARE_BITMAP(state, __IPV4_DEVCONF_MAX - 1);
+	int	data[IPV4_DEVCONF_MAX];
+	DECLARE_BITMAP(state, IPV4_DEVCONF_MAX);
 };
 
 struct in_device {
@@ -90,7 +92,7 @@ static inline void ipv4_devconf_set(stru
 
 static inline void ipv4_devconf_setall(struct in_device *in_dev)
 {
-	bitmap_fill(in_dev->cnf.state, __IPV4_DEVCONF_MAX - 1);
+	bitmap_fill(in_dev->cnf.state, IPV4_DEVCONF_MAX);
 }
 
 #define IN_DEV_CONF_GET(in_dev, attr) \

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next 2/4] inet: Define IPV4_DEVCONF_MAX
  2010-11-16 14:31 [PATCH net-next 2/4] inet: Define IPV4_DEVCONF_MAX Thomas Graf
@ 2010-11-17 19:30 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-11-17 19:30 UTC (permalink / raw)
  To: tgraf; +Cc: netdev

From: Thomas Graf <tgraf@infradead.org>
Date: Tue, 16 Nov 2010 09:31:20 -0500

> Define IPV4_DEVCONF_MAX to get rid of MAX - 1 notation.
> 
> Signed-off-by: Thomas Graf <tgraf@infradead.org>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-17 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-16 14:31 [PATCH net-next 2/4] inet: Define IPV4_DEVCONF_MAX Thomas Graf
2010-11-17 19:30 ` David Miller

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).