mirror_ubuntu-kernels/drivers/thermal/intel/int340x_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
..
acpi_thermal_rel.c thermal: intel: int340x_thermal: New IOCTLs for Passive v2 table 2023-06-13 17:57:39 +02:00
acpi_thermal_rel.h thermal: intel: int340x_thermal: New IOCTLs for Passive v2 table 2023-06-13 17:57:39 +02:00
int340x_thermal_zone.c thermal/core: Use the thermal zone 'devdata' accessor in thermal located drivers 2023-03-03 20:45:02 +01:00
int340x_thermal_zone.h thermal: intel: int340x: Use generic trip points table 2023-01-27 15:11:12 +01:00
int3400_thermal.c thermal: intel: int340x: Add new line for UUID display 2023-05-24 19:50:04 +02:00
int3401_thermal.c thermal/drivers/int340x: Improve the tcc offset saving for suspend/resume 2021-10-21 11:46:24 +02:00
int3402_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
int3403_thermal.c thermal: intel: int340x: Rework updating trip points 2023-01-27 15:11:12 +01:00
int3406_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Kconfig thermal: intel: int340x: Use generic trip points table 2023-01-27 15:11:12 +01:00
Makefile thermal/drivers/int340x/processor_thermal: Add PCI MMIO based thermal driver 2021-07-04 18:28:04 +02:00
processor_thermal_device_pci_legacy.c thermal: int340x: processor_thermal: Use module_pci_driver() macro 2022-09-24 19:22:09 +02:00
processor_thermal_device_pci.c thermal: intel: int340x: Add DLVR support for RFIM control 2023-04-18 15:24:40 +02:00
processor_thermal_device.c thermal: intel: int340x: Add DLVR support for RFIM control 2023-04-18 15:24:40 +02:00
processor_thermal_device.h thermal: intel: int340x: Add DLVR support for RFIM control 2023-04-18 15:24:40 +02:00
processor_thermal_mbox.c thermal/drivers/int340x: Fix RFIM mailbox write commands 2021-12-30 16:42:53 +01:00
processor_thermal_rapl.c powercap: intel_rapl: Fix a sparse warning in TPMI interface 2023-08-01 13:45:08 +02:00
processor_thermal_rfim.c thermal: intel: int340x: Add DLVR support for RFIM control 2023-04-18 15:24:40 +02:00