From: Yuli Wang wangyuli@uniontech.com
[ Upstream commit a0d3c8bcb9206ac207c7ad3182027c6b0a1319bb ]
In LoongArch, get_numa_distances_cnt() isn't in use, resulting in a compiler warning.
Fix follow errors with clang-18 when W=1e:
arch/loongarch/kernel/acpi.c:259:28: error: unused function 'get_numa_distances_cnt' [-Werror,-Wunused-function] 259 | static inline unsigned int get_numa_distances_cnt(struct acpi_table_slit *slit) | ^~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
Link: https://lore.kernel.org/all/Z7bHPVUH4lAezk0E@kernel.org/ Signed-off-by: Yuli Wang wangyuli@uniontech.com Signed-off-by: Huacai Chen chenhuacai@loongson.cn --- arch/loongarch/kernel/acpi.c | 12 ------------ 1 file changed, 12 deletions(-)
diff --git a/arch/loongarch/kernel/acpi.c b/arch/loongarch/kernel/acpi.c index 382a09a7152c..1120ac2824f6 100644 --- a/arch/loongarch/kernel/acpi.c +++ b/arch/loongarch/kernel/acpi.c @@ -249,18 +249,6 @@ static __init int setup_node(int pxm) return acpi_map_pxm_to_node(pxm); }
-/* - * Callback for SLIT parsing. pxm_to_node() returns NUMA_NO_NODE for - * I/O localities since SRAT does not list them. I/O localities are - * not supported at this point. - */ -unsigned int numa_distance_cnt; - -static inline unsigned int get_numa_distances_cnt(struct acpi_table_slit *slit) -{ - return slit->locality_count; -} - void __init numa_set_distance(int from, int to, int distance) { if ((u8)distance != distance || (from == to && distance != LOCAL_DISTANCE)) {
[ Sasha's backport helper bot ]
Hi,
✅ All tests passed successfully. No issues detected. No action required from the submitter.
The upstream commit SHA1 provided is correct: a0d3c8bcb9206ac207c7ad3182027c6b0a1319bb
Status in newer kernel trees: 6.14.y | Present (exact SHA1) 6.12.y | Not found 6.6.y | Not found
Note: The patch differs from the upstream commit: --- 1: a0d3c8bcb9206 ! 1: f2e42c975a335 LoongArch: Eliminate superfluous get_numa_distances_cnt() @@ Metadata ## Commit message ## LoongArch: Eliminate superfluous get_numa_distances_cnt()
+ [ Upstream commit a0d3c8bcb9206ac207c7ad3182027c6b0a1319bb ] + In LoongArch, get_numa_distances_cnt() isn't in use, resulting in a compiler warning.
---
Results of testing on various branches:
| Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-6.1.y | Success | Success | | stable/linux-6.6.y | Success | Success | | stable/linux-6.12.y | Success | Success |
linux-stable-mirror@lists.linaro.org