Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

lib: remove lib/nodemask.c

Commit 36d4b36b6959 ("lib/nodemask: inline next_node_in() and
node_random()") removed the lib/nodemask.c file, but the remove didn't
happen when the patch was applied.

Reported-by: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Signed-off-by: Yury Norov <yury.norov@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Yury Norov and committed by
Linus Torvalds
f75f5d58 c3adefb5

-23
-23
lib/nodemask.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - #include <linux/nodemask.h> 3 - #include <linux/module.h> 4 - #include <linux/random.h> 5 - 6 - EXPORT_SYMBOL(__next_node_in); 7 - 8 - #ifdef CONFIG_NUMA 9 - /* 10 - * Return the bit number of a random bit set in the nodemask. 11 - * (returns NUMA_NO_NODE if nodemask is empty) 12 - */ 13 - int node_random(const nodemask_t *maskp) 14 - { 15 - int w, bit = NUMA_NO_NODE; 16 - 17 - w = nodes_weight(*maskp); 18 - if (w) 19 - bit = bitmap_ord_to_pos(maskp->bits, 20 - get_random_int() % w, MAX_NUMNODES); 21 - return bit; 22 - } 23 - #endif