[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BD79186B4FD85F4B8E60E381CAEE19090179A5BE@mi8nycmail19.Mi8.com>
Date: Thu, 14 May 2009 13:25:45 -0400
From: "H Hartley Sweeten" <hartleys@...ionengravers.com>
To: "J. Bruce Fields" <bfields@...ldses.org>
Cc: <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] net/sunrpc/svc.c: fix sparse warning
Change any_online_node() from a macro to a static inline function.
any_online_node() uses the symbol 'node', this causes a sparse
warning in net/sunrpc/svc.c. Changing the macro to a static
inline function removes the sparse warning and will prevent the
same warning from possibly occurring in the future.
Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
---
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index 848025c..16df302 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -440,15 +440,6 @@ static inline int num_node_state(enum node_states state)
#define node_online_map node_states[N_ONLINE]
#define node_possible_map node_states[N_POSSIBLE]
-#define any_online_node(mask) \
-({ \
- int node; \
- for_each_node_mask(node, (mask)) \
- if (node_online(node)) \
- break; \
- node; \
-})
-
#define num_online_nodes() num_node_state(N_ONLINE)
#define num_possible_nodes() num_node_state(N_POSSIBLE)
#define node_online(node) node_state((node), N_ONLINE)
@@ -460,4 +451,15 @@ static inline int num_node_state(enum node_states state)
#define for_each_node(node) for_each_node_state(node, N_POSSIBLE)
#define for_each_online_node(node) for_each_node_state(node, N_ONLINE)
+static inline int any_online_node(nodemask_t mask)
+{
+ int node;
+
+ for_each_node_mask(node, mask) {
+ if (node_online(node))
+ break;
+ }
+ return node;
+}
+
#endif /* __LINUX_NODEMASK_H */
--
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