[PATCH] ACPI: fix the warning reported by the sparse
kernel test robot
lkp at intel.com
Fri Nov 1 19:05:00 PDT 2024
Hi Yunhui,
kernel test robot noticed the following build warnings:
[auto build test WARNING on rafael-pm/linux-next]
[also build test WARNING on rafael-pm/bleeding-edge arm64/for-next/core soc/for-next linus/master arm/for-next arm/fixes v6.12-rc5 next-20241101]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Yunhui-Cui/ACPI-fix-the-warning-reported-by-the-sparse/20241031-192215
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
patch link: https://lore.kernel.org/r/20241031112030.72647-1-cuiyunhui%40bytedance.com
patch subject: [PATCH] ACPI: fix the warning reported by the sparse
config: loongarch-randconfig-r112-20241102 (https://download.01.org/0day-ci/archive/20241102/202411020935.IEiVDiTL-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.1.0
reproduce: (https://download.01.org/0day-ci/archive/20241102/202411020935.IEiVDiTL-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411020935.IEiVDiTL-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> arch/loongarch/kernel/acpi.c:43:30: sparse: sparse: incorrect type in return expression (different address spaces) @@ expected void * @@ got void [noderef] __iomem * @@
arch/loongarch/kernel/acpi.c:43:30: sparse: expected void *
arch/loongarch/kernel/acpi.c:43:30: sparse: got void [noderef] __iomem *
arch/loongarch/kernel/acpi.c:206:40: sparse: sparse: undefined identifier '__builtin_loongarch_csrrd_w'
vim +43 arch/loongarch/kernel/acpi.c
628c3bb40e9a8ce Huacai Chen 2022-05-31 21
628c3bb40e9a8ce Huacai Chen 2022-05-31 22 int acpi_disabled;
628c3bb40e9a8ce Huacai Chen 2022-05-31 23 EXPORT_SYMBOL(acpi_disabled);
628c3bb40e9a8ce Huacai Chen 2022-05-31 24 int acpi_noirq;
628c3bb40e9a8ce Huacai Chen 2022-05-31 25 int acpi_pci_disabled;
628c3bb40e9a8ce Huacai Chen 2022-05-31 26 EXPORT_SYMBOL(acpi_pci_disabled);
628c3bb40e9a8ce Huacai Chen 2022-05-31 27 int acpi_strict = 1; /* We have no workarounds on LoongArch */
628c3bb40e9a8ce Huacai Chen 2022-05-31 @28 int num_processors;
628c3bb40e9a8ce Huacai Chen 2022-05-31 29 int disabled_cpus;
628c3bb40e9a8ce Huacai Chen 2022-05-31 30
628c3bb40e9a8ce Huacai Chen 2022-05-31 31 u64 acpi_saved_sp;
628c3bb40e9a8ce Huacai Chen 2022-05-31 32
628c3bb40e9a8ce Huacai Chen 2022-05-31 33 #define PREFIX "ACPI: "
628c3bb40e9a8ce Huacai Chen 2022-05-31 34
4551b30525cf3d2 Huacai Chen 2024-02-06 35 struct acpi_madt_core_pic acpi_core_pic[MAX_CORE_PIC];
f6f0c9a74a48448 Huacai Chen 2023-06-29 36
4802318a3cea8b3 Yunhui Cui 2024-10-31 37 void __init *__acpi_map_table(unsigned long phys, unsigned long size)
628c3bb40e9a8ce Huacai Chen 2022-05-31 38 {
628c3bb40e9a8ce Huacai Chen 2022-05-31 39
628c3bb40e9a8ce Huacai Chen 2022-05-31 40 if (!phys || !size)
628c3bb40e9a8ce Huacai Chen 2022-05-31 41 return NULL;
628c3bb40e9a8ce Huacai Chen 2022-05-31 42
628c3bb40e9a8ce Huacai Chen 2022-05-31 @43 return early_memremap(phys, size);
628c3bb40e9a8ce Huacai Chen 2022-05-31 44 }
628c3bb40e9a8ce Huacai Chen 2022-05-31 45 void __init __acpi_unmap_table(void __iomem *map, unsigned long size)
628c3bb40e9a8ce Huacai Chen 2022-05-31 46 {
628c3bb40e9a8ce Huacai Chen 2022-05-31 47 if (!map || !size)
628c3bb40e9a8ce Huacai Chen 2022-05-31 48 return;
628c3bb40e9a8ce Huacai Chen 2022-05-31 49
628c3bb40e9a8ce Huacai Chen 2022-05-31 50 early_memunmap(map, size);
628c3bb40e9a8ce Huacai Chen 2022-05-31 51 }
628c3bb40e9a8ce Huacai Chen 2022-05-31 52
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the linux-arm-kernel
mailing list