]> git.dujemihanovic.xyz Git - linux.git/commit
arch/topology: Fix variable naming to avoid shadowing
authorVincent Guittot <vincent.guittot@linaro.org>
Thu, 25 Apr 2024 07:37:09 +0000 (09:37 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 15 May 2024 08:22:16 +0000 (10:22 +0200)
commite5bc44e47c531860be96ac615314b1ab23d5aa2b
tree6ca9bf7461a4050a0b5b6b6e3c6626759122ca8f
parent9776dd36095be19f5a0ad9f07a4fc221d2a0609a
arch/topology: Fix variable naming to avoid shadowing

Using 'hw_pressure' for local variable name is confusing in regard to the
per-CPU 'hw_pressure' variable that uses the same name:

  include/linux/arch_topology.h:DECLARE_PER_CPU(unsigned long, hw_pressure);

... which puts it into a global scope for all code that includes
<linux/topology.h>, shadowing the local variable.

Rename it to avoid compiler confusion & Sparse warnings.

[ mingo: Expanded the changelog. ]

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20240425073709.379016-1-vincent.guittot@linaro.org
Closes: https://lore.kernel.org/oe-kbuild-all/202404250740.VhQQoD7N-lkp@intel.com/
Fixes: d4dbc991714e ("sched/cpufreq: Rename arch_update_thermal_pressure() => arch_update_hw_pressure()")
Tested-by: Konrad Dybcio <konrad.dybcio@linaro.org> # QC SM8550 QRD
drivers/base/arch_topology.c