Skip to content

Commit f446987

Browse files
Robert Richterrafaeljw
authored andcommitted
ACPI/NUMA: Squash acpi_numa_slit_init() into acpi_parse_slit()
After removing architectural code the helper function acpi_numa_slit_init() is no longer needed. Squash it into acpi_parse_slit(). No functional changes intended. Reviewed-by: Dan Williams <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Alison Schofield <[email protected]> Signed-off-by: Robert Richter <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 3a785e1 commit f446987

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

drivers/acpi/numa/srat.c

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,16 @@ __weak int __init numa_fill_memblks(u64 start, u64 end)
218218
* I/O localities since SRAT does not list them. I/O localities are
219219
* not supported at this point.
220220
*/
221-
static void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
221+
static int __init acpi_parse_slit(struct acpi_table_header *table)
222222
{
223+
struct acpi_table_slit *slit = (struct acpi_table_slit *)table;
223224
int i, j;
224225

226+
if (!slit_valid(slit)) {
227+
pr_info("SLIT table looks invalid. Not used.\n");
228+
return -EINVAL;
229+
}
230+
225231
for (i = 0; i < slit->locality_count; i++) {
226232
const int from_node = pxm_to_node(i);
227233

@@ -238,6 +244,8 @@ static void __init acpi_numa_slit_init(struct acpi_table_slit *slit)
238244
slit->entry[slit->locality_count * i + j]);
239245
}
240246
}
247+
248+
return 0;
241249
}
242250

243251
static int __init
@@ -341,19 +349,6 @@ static int __init acpi_parse_cfmws(union acpi_subtable_headers *header,
341349
return 0;
342350
}
343351

344-
static int __init acpi_parse_slit(struct acpi_table_header *table)
345-
{
346-
struct acpi_table_slit *slit = (struct acpi_table_slit *)table;
347-
348-
if (!slit_valid(slit)) {
349-
pr_info("SLIT table looks invalid. Not used.\n");
350-
return -EINVAL;
351-
}
352-
acpi_numa_slit_init(slit);
353-
354-
return 0;
355-
}
356-
357352
void __init __weak
358353
acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa)
359354
{

0 commit comments

Comments
 (0)