Hi Lijun,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: fb3a7131883be36037affebc26a6597087cbd012 commit: d8e64215b6c932fd8d7c521d6cb3bcf6414d300c [12457/21565] svm: Delete ifdef CONFIG_ACPI in svm config: arm64-randconfig-001-20240112 (https://download.01.org/0day-ci/archive/20240123/202401230321.uVO9BE4k-lkp@i...) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240123/202401230321.uVO9BE4k-lkp@i...)
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@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202401230321.uVO9BE4k-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/char/svm.c:158:6: warning: no previous prototype for 'sysrq_sched_debug_show_export' [-Wmissing-prototypes] 158 | void sysrq_sched_debug_show_export(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/char/svm.c:1132:5: warning: no previous prototype for 'svm_get_pasid' [-Wmissing-prototypes] 1132 | int svm_get_pasid(pid_t vpid, int dev_id __maybe_unused) | ^~~~~~~~~~~~~
drivers/char/svm.c:1762:36: warning: 'svm_acpi_match' defined but not used [-Wunused-const-variable=]
1762 | static const struct acpi_device_id svm_acpi_match[] = { | ^~~~~~~~~~~~~~ In file included from arch/arm64/include/asm/atomic.h:34, from include/linux/atomic.h:7, from include/asm-generic/bitops/atomic.h:5, from arch/arm64/include/asm/bitops.h:37, from include/linux/bitops.h:19, from include/linux/kernel.h:11, from include/asm-generic/bug.h:18, from arch/arm64/include/asm/bug.h:37, from arch/arm64/include/asm/memory.h:27, from arch/arm64/include/asm/esr.h:21, from drivers/char/svm.c:10: In function '__cmpxchg_case_mb_4', inlined from '__cmpxchg_mb' at arch/arm64/include/asm/cmpxchg.h:143:1, inlined from 'svm_proc_load_flag' at drivers/char/svm.c:1465:12: arch/arm64/include/asm/atomic_lse.h:458:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'atomic_t[1]' [-Warray-bounds=] 458 | asm volatile(ARM64_LSE_ATOMIC_INSN( \ | ^~~ arch/arm64/include/asm/atomic_lse.h:487:1: note: in expansion of macro '__CMPXCHG_CASE' 487 | __CMPXCHG_CASE(w, , mb_4, al, "memory") | ^~~~~~~~~~~~~~ drivers/char/svm.c: In function 'svm_proc_load_flag': drivers/char/svm.c:1456:25: note: object 'l2buf_load_flag' of size 4 1456 | static atomic_t l2buf_load_flag = ATOMIC_INIT(0); | ^~~~~~~~~~~~~~~ In function '__cmpxchg_case_mb_4', inlined from '__cmpxchg_mb' at arch/arm64/include/asm/cmpxchg.h:143:1, inlined from 'svm_proc_load_flag' at drivers/char/svm.c:1465:12: arch/arm64/include/asm/atomic_lse.h:458:9: warning: array subscript 'long unsigned int[0]' is partly outside array bounds of 'atomic_t[1]' [-Warray-bounds=] 458 | asm volatile(ARM64_LSE_ATOMIC_INSN( \ | ^~~ arch/arm64/include/asm/atomic_lse.h:487:1: note: in expansion of macro '__CMPXCHG_CASE' 487 | __CMPXCHG_CASE(w, , mb_4, al, "memory") | ^~~~~~~~~~~~~~ drivers/char/svm.c: In function 'svm_proc_load_flag': drivers/char/svm.c:1456:25: note: object 'l2buf_load_flag' of size 4 1456 | static atomic_t l2buf_load_flag = ATOMIC_INIT(0); | ^~~~~~~~~~~~~~~
vim +/svm_acpi_match +1762 drivers/char/svm.c
8f29578be61750 Jiankang Chen 2019-10-28 1761 8f29578be61750 Jiankang Chen 2019-10-28 @1762 static const struct acpi_device_id svm_acpi_match[] = { 8f29578be61750 Jiankang Chen 2019-10-28 1763 { "HSVM1980", 0}, 8f29578be61750 Jiankang Chen 2019-10-28 1764 { } 8f29578be61750 Jiankang Chen 2019-10-28 1765 }; 8f29578be61750 Jiankang Chen 2019-10-28 1766 MODULE_DEVICE_TABLE(acpi, svm_acpi_match); d8e64215b6c932 Lijun Fang 2020-01-16 1767
:::::: The code at line 1762 was first introduced by commit :::::: 8f29578be61750d83b8effb090c25e07432dcb75 svm: add svm drv framework for hi1910 and hi1980
:::::: TO: Jiankang Chen chenjiankang1@huawei.com :::::: CC: Xie XiuQi xiexiuqi@huawei.com