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>
This commit is contained in:

committed by
Linus Torvalds

parent
b9726c26dc
commit
ce0725f78a
@@ -445,7 +445,7 @@ static inline int next_memory_node(int nid)
|
||||
}
|
||||
|
||||
extern unsigned int nr_node_ids;
|
||||
extern int nr_online_nodes;
|
||||
extern unsigned int nr_online_nodes;
|
||||
|
||||
static inline void node_set_online(int nid)
|
||||
{
|
||||
@@ -486,7 +486,7 @@ static inline int num_node_state(enum node_states state)
|
||||
#define first_memory_node 0
|
||||
#define next_online_node(nid) (MAX_NUMNODES)
|
||||
#define nr_node_ids 1U
|
||||
#define nr_online_nodes 1
|
||||
#define nr_online_nodes 1U
|
||||
|
||||
#define node_set_online(node) node_set_state((node), N_ONLINE)
|
||||
#define node_set_offline(node) node_clear_state((node), N_ONLINE)
|
||||
|
Reference in New Issue
Block a user