mm/page_alloc.c: clean code by removing unnecessary initialization
Previously variable 'tmp' was initialized, but was not read later before reassigning. So the initialization can be removed. [akpm@linux-foundation.org: remove `tmp' altogether] Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Link: https://lkml.kernel.org/r/20200904132422.17387-1-mateusznosek0@gmail.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
6a654e36fa
commit
b630749f01
|
@ -5651,7 +5651,6 @@ static int find_next_best_node(int node, nodemask_t *used_node_mask)
|
||||||
int n, val;
|
int n, val;
|
||||||
int min_val = INT_MAX;
|
int min_val = INT_MAX;
|
||||||
int best_node = NUMA_NO_NODE;
|
int best_node = NUMA_NO_NODE;
|
||||||
const struct cpumask *tmp = cpumask_of_node(0);
|
|
||||||
|
|
||||||
/* Use the local node if we haven't already */
|
/* Use the local node if we haven't already */
|
||||||
if (!node_isset(node, *used_node_mask)) {
|
if (!node_isset(node, *used_node_mask)) {
|
||||||
|
@ -5672,8 +5671,7 @@ static int find_next_best_node(int node, nodemask_t *used_node_mask)
|
||||||
val += (n < node);
|
val += (n < node);
|
||||||
|
|
||||||
/* Give preference to headless and unused nodes */
|
/* Give preference to headless and unused nodes */
|
||||||
tmp = cpumask_of_node(n);
|
if (!cpumask_empty(cpumask_of_node(n)))
|
||||||
if (!cpumask_empty(tmp))
|
|
||||||
val += PENALTY_FOR_NODE_WITH_CPUS;
|
val += PENALTY_FOR_NODE_WITH_CPUS;
|
||||||
|
|
||||||
/* Slight preference for less loaded node */
|
/* Slight preference for less loaded node */
|
||||||
|
|
Loading…
Reference in New Issue