sched/topology: Remove redundant variable and fix incorrect type in build_sched_domains
authorK Prateek Nayak <kprateek.nayak@amd.com>
Fri, 18 Feb 2022 16:27:43 +0000 (21:57 +0530)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 8 Mar 2022 15:08:40 +0000 (16:08 +0100)
commit7f434dff76215af00c26ba6449eaa4738fe9e2ab
tree0de225b4643b7b1620312de7ba6d47d57fd3f49e
parent821aecd09e5ad2f8d4c3d8195333d272b392f7d3
sched/topology: Remove redundant variable and fix incorrect type in build_sched_domains

While investigating the sparse warning reported by the LKP bot [1],
observed that we have a redundant variable "top" in the function
build_sched_domains that was introduced in the recent commit
e496132ebedd ("sched/fair: Adjust the allowed NUMA imbalance when
SD_NUMA spans multiple LLCs")

The existing variable "sd" suffices which allows us to remove the
redundant variable "top" while annotating the other variable "top_p"
with the "__rcu" annotation to silence the sparse warning.

[1] https://lore.kernel.org/lkml/202202170853.9vofgC3O-lkp@intel.com/

Fixes: e496132ebedd ("sched/fair: Adjust the allowed NUMA imbalance when SD_NUMA spans multiple LLCs")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Link: https://lore.kernel.org/r/20220218162743.1134-1-kprateek.nayak@amd.com
kernel/sched/topology.c