Commit ce0725f7 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds

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@avx2Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Reviewed-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b9726c26
...@@ -445,7 +445,7 @@ static inline int next_memory_node(int nid) ...@@ -445,7 +445,7 @@ static inline int next_memory_node(int nid)
} }
extern unsigned int nr_node_ids; 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) static inline void node_set_online(int nid)
{ {
...@@ -486,7 +486,7 @@ static inline int num_node_state(enum node_states state) ...@@ -486,7 +486,7 @@ static inline int num_node_state(enum node_states state)
#define first_memory_node 0 #define first_memory_node 0
#define next_online_node(nid) (MAX_NUMNODES) #define next_online_node(nid) (MAX_NUMNODES)
#define nr_node_ids 1U #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_online(node) node_set_state((node), N_ONLINE)
#define node_set_offline(node) node_clear_state((node), N_ONLINE) #define node_set_offline(node) node_clear_state((node), N_ONLINE)
......
...@@ -290,7 +290,7 @@ EXPORT_SYMBOL(movable_zone); ...@@ -290,7 +290,7 @@ EXPORT_SYMBOL(movable_zone);
#if MAX_NUMNODES > 1 #if MAX_NUMNODES > 1
unsigned int nr_node_ids __read_mostly = MAX_NUMNODES; unsigned int nr_node_ids __read_mostly = MAX_NUMNODES;
int nr_online_nodes __read_mostly = 1; unsigned int nr_online_nodes __read_mostly = 1;
EXPORT_SYMBOL(nr_node_ids); EXPORT_SYMBOL(nr_node_ids);
EXPORT_SYMBOL(nr_online_nodes); EXPORT_SYMBOL(nr_online_nodes);
#endif #endif
...@@ -5664,7 +5664,7 @@ void __ref build_all_zonelists(pg_data_t *pgdat) ...@@ -5664,7 +5664,7 @@ void __ref build_all_zonelists(pg_data_t *pgdat)
else else
page_group_by_mobility_disabled = 0; page_group_by_mobility_disabled = 0;
pr_info("Built %i zonelists, mobility grouping %s. Total pages: %ld\n", pr_info("Built %u zonelists, mobility grouping %s. Total pages: %ld\n",
nr_online_nodes, nr_online_nodes,
page_group_by_mobility_disabled ? "off" : "on", page_group_by_mobility_disabled ? "off" : "on",
vm_total_pages); vm_total_pages);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment