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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -445,7 +445,7 @@ static inline int next_memory_node(int nid) · 444 unmodified lines | |||
| 445 | } | 445 | } |
| 446 | 446 | ||
| 447 | extern unsigned int nr_node_ids; | 447 | extern unsigned int nr_node_ids; |
| 448 | extern int nr_online_nodes; | 448 | extern unsigned int nr_online_nodes; |
| 449 | 449 | ||
| 450 | static inline void node_set_online(int nid) | 450 | static inline void node_set_online(int nid) |
| 451 | { | 451 | { |
| @@ -486,7 +486,7 @@ static inline int num_node_state(enum node_states state) · 34 unmodified lines | |||
| 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) |