The patch titled Subject: numa: make "nr_online_nodes" unsigned int has been added to the -mm tree. Its filename is numa-make-nr_online_nodes-unsigned-int.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/numa-make-nr_online_nodes-unsigned-int.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/numa-make-nr_online_nodes-unsigned-int.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Alexey Dobriyan <adobriyan@xxxxxxxxx> Subject: 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@xxxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/include/linux/nodemask.h~numa-make-nr_online_nodes-unsigned-int +++ a/include/linux/nodemask.h @@ -100,10 +100,10 @@ extern nodemask_t _unused_nodemask_arg_; #if MAX_NUMNODES > 1 extern unsigned int nr_node_ids; -extern int nr_online_nodes; +extern unsigned int nr_online_nodes; #else #define nr_node_ids 1U -#define nr_online_nodes 1 +#define nr_online_nodes 1U #endif /** --- a/mm/page_alloc.c~numa-make-nr_online_nodes-unsigned-int +++ a/mm/page_alloc.c @@ -290,7 +290,7 @@ EXPORT_SYMBOL(movable_zone); #if MAX_NUMNODES > 1 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_online_nodes); #endif @@ -5652,7 +5652,7 @@ void __ref build_all_zonelists(pg_data_t else 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, page_group_by_mobility_disabled ? "off" : "on", vm_total_pages); _ Patches currently in -mm which might be from adobriyan@xxxxxxxxx are mm-shuffle-gfp_-flags.patch numa-make-nr_node_ids-unsigned-int.patch numa-make-nr_online_nodes-unsigned-int.patch proc-return-exit-code-4-for-skipped-tests.patch proc-read-kernel-cpu-stat-pointer-once.patch proc-use-seq_puts-everywhere.patch proc-test-proc-maps-smaps-smaps_rollup-statm.patch elf-dont-be-afraid-of-overflow.patch elf-use-list_for_each_entry.patch elf-spread-const-a-little.patch proc-calculate-end-pointer-for-proc-lookup-at-compile-time.patch