linux-stable/drivers/thermal
Zhang Rui 16e95a62ee powercap: intel_rapl: Fix a sparse warning in TPMI interface
Depends on the interface used, the RAPL registers can be either MSR
indexes or memory mapped IO addresses. Current RAPL common code uses u64
to save both MSR and memory mapped IO registers. With this, when
handling register address with an __iomem annotation, it triggers a
sparse warning like below:

sparse warnings: (new ones prefixed by >>)
>> drivers/powercap/intel_rapl_tpmi.c:141:41: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected unsigned long long [usertype] *tpmi_rapl_regs @@     got void [noderef] __iomem * @@
   drivers/powercap/intel_rapl_tpmi.c:141:41: sparse:     expected unsigned long long [usertype] *tpmi_rapl_regs
   drivers/powercap/intel_rapl_tpmi.c:141:41: sparse:     got void [noderef] __iomem *

Fix the problem by using a union to save the registers instead.

Suggested-by: David Laight <David.Laight@ACULAB.COM>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202307031405.dy3druuy-lkp@intel.com/
Tested-by: Wang Wendy <wendy.wang@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2023-08-01 13:45:08 +02:00
..
broadcom
intel powercap: intel_rapl: Fix a sparse warning in TPMI interface 2023-08-01 13:45:08 +02:00
mediatek thermal/drivers/mediatek/lvts_thermal: Remove redundant msg in lvts_ctrl_start() 2023-06-26 12:03:14 +02:00
qcom thermal/drivers/qcom/temp-alarm: Use dev_err_probe 2023-06-26 12:10:22 +02:00
samsung
st thermal/drivers/stm32: Convert to platform remove callback returning void 2023-06-26 12:03:14 +02:00
tegra thermal/drivers/tegra: Remove redundant msg in tegra_tsensor_register_channel() 2023-06-26 12:03:14 +02:00
ti-soc-thermal thermal/drivers/ti-soc: Remove redundant msg in ti_thermal_expose_sensor() 2023-06-26 12:03:14 +02:00
amlogic_thermal.c thermal/drivers/amlogic: Remove redundant msg in amlogic_thermal_probe() 2023-06-26 12:03:14 +02:00
armada_thermal.c thermal/drivers/armada: Add support for AP807 thermal data 2023-06-26 12:03:14 +02:00
cpufreq_cooling.c
cpuidle_cooling.c
da9062-thermal.c
db8500_thermal.c
devfreq_cooling.c
dove_thermal.c
gov_bang_bang.c
gov_fair_share.c
gov_power_allocator.c
gov_step_wise.c
gov_user_space.c
hisi_thermal.c
imx8mm_thermal.c thermal/drivers/imx: Remove redundant msg in imx8mm_tmu_probe() and imx_sc_thermal_probe() 2023-06-26 12:03:14 +02:00
imx_sc_thermal.c thermal/drivers/imx: Remove redundant msg in imx8mm_tmu_probe() and imx_sc_thermal_probe() 2023-06-26 12:03:14 +02:00
imx_thermal.c
k3_bandgap.c drivers/thermal/k3: Remove redundant msg in k3_bandgap_probe() 2023-06-26 12:03:14 +02:00
k3_j72xx_bandgap.c
Kconfig thermal: Allow selecting the bang-bang governor as default 2023-06-26 12:03:13 +02:00
khadas_mcu_fan.c
kirkwood_thermal.c
Makefile
max77620_thermal.c
qoriq_thermal.c thermal/drivers/qoriq: Remove redundant msg in qoriq_tmu_register_tmu_zone() 2023-06-26 12:03:14 +02:00
rcar_gen3_thermal.c drivers/thermal/rcar_gen3_thermal: add reading fuses for Gen4 2023-06-26 12:03:13 +02:00
rcar_thermal.c
rockchip_thermal.c
rzg2l_thermal.c
spear_thermal.c
sprd_thermal.c
sun8i_thermal.c thermal/drivers/sun8i: Remove redundant msg in sun8i_ths_register() 2023-06-26 12:03:14 +02:00
thermal-generic-adc.c thermal/drivers/generic-adc: Register thermal zones as hwmon sensors 2023-06-26 12:03:14 +02:00
thermal_acpi.c
thermal_core.c thermal: core: constify params in thermal_zone_device_register 2023-07-24 09:51:31 +02:00
thermal_core.h thermal: Allow selecting the bang-bang governor as default 2023-06-26 12:03:13 +02:00
thermal_helpers.c
thermal_hwmon.c thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs() 2023-06-26 12:03:14 +02:00
thermal_hwmon.h
thermal_mmio.c
thermal_netlink.c
thermal_netlink.h
thermal_of.c thermal: of: fix double-free on unregistration 2023-07-24 09:51:31 +02:00
thermal_sysfs.c
thermal_trace.h
thermal_trace_ipa.h
thermal_trip.c
uniphier_thermal.c