aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nodemask.h
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2019-03-05 18:48:29 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2019-03-06 00:07:20 -0500
commitce0725f78a56a59bdb07cef003bc6fef722da38e (patch)
tree3bb517e055b311034aa777eac0b754cdf42bea25 /include/linux/nodemask.h
parentb9726c26dc21b15a2faea96fae3a42f2f7fffdcb (diff)
numa: make "nr_online_nodes" unsigned int
Number of online NUMA nodes can't be negative as well. This doesn't save space as the variable is used only in 32-bit context, but do it anyway for consistency. Link: http://lkml.kernel.org/r/20190201223151.GB15820@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/nodemask.h')
-rw-r--r--include/linux/nodemask.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index 962c5e783d50..27e7fa36f707 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -445,7 +445,7 @@ static inline int next_memory_node(int nid)
445} 445}
446 446
447extern unsigned int nr_node_ids; 447extern unsigned int nr_node_ids;
448extern int nr_online_nodes; 448extern unsigned int nr_online_nodes;
449 449
450static inline void node_set_online(int nid) 450static inline void node_set_online(int nid)
451{ 451{
@@ -486,7 +486,7 @@ static inline int num_node_state(enum node_states state)
486#define first_memory_node 0 486#define first_memory_node 0
487#define next_online_node(nid) (MAX_NUMNODES) 487#define next_online_node(nid) (MAX_NUMNODES)
488#define nr_node_ids 1U 488#define nr_node_ids 1U
489#define nr_online_nodes 1 489#define nr_online_nodes 1U
490 490
491#define node_set_online(node) node_set_state((node), N_ONLINE) 491#define node_set_online(node) node_set_state((node), N_ONLINE)
492#define node_set_offline(node) node_clear_state((node), N_ONLINE) 492#define node_set_offline(node) node_clear_state((node), N_ONLINE)