Skip to content

Commit a0d3c8b

Browse files
Avenger-285714chenhuacai
authored andcommitted
LoongArch: Eliminate superfluous get_numa_distances_cnt()
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>
1 parent da64a23 commit a0d3c8b

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

arch/loongarch/kernel/acpi.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -249,18 +249,6 @@ static __init int setup_node(int pxm)
249249
return acpi_map_pxm_to_node(pxm);
250250
}
251251

252-
/*
253-
* Callback for SLIT parsing. pxm_to_node() returns NUMA_NO_NODE for
254-
* I/O localities since SRAT does not list them. I/O localities are
255-
* not supported at this point.
256-
*/
257-
unsigned int numa_distance_cnt;
258-
259-
static inline unsigned int get_numa_distances_cnt(struct acpi_table_slit *slit)
260-
{
261-
return slit->locality_count;
262-
}
263-
264252
void __init numa_set_distance(int from, int to, int distance)
265253
{
266254
if ((u8)distance != distance || (from == to && distance != LOCAL_DISTANCE)) {

0 commit comments

Comments
 (0)