Skip to content

Commit 1c60f91

Browse files
guohanjunrafaeljw
authored andcommitted
ACPI: NUMA: Remove the useless sub table pointer check
In acpi_parse_entries_array(), the subtable entries (entry.hdr) will never be NULL, so for ACPI subtable handler in struct acpi_subtable_proc, will never handle NULL subtable entries. Remove those useless subtable pointer checks in the callback handlers. Signed-off-by: Hanjun Guo <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 24194a7 commit 1c60f91

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

drivers/acpi/numa/srat.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,6 @@ acpi_parse_x2apic_affinity(union acpi_subtable_headers *header,
291291
struct acpi_srat_x2apic_cpu_affinity *processor_affinity;
292292

293293
processor_affinity = (struct acpi_srat_x2apic_cpu_affinity *)header;
294-
if (!processor_affinity)
295-
return -EINVAL;
296294

297295
acpi_table_print_srat_entry(&header->common);
298296

@@ -309,8 +307,6 @@ acpi_parse_processor_affinity(union acpi_subtable_headers *header,
309307
struct acpi_srat_cpu_affinity *processor_affinity;
310308

311309
processor_affinity = (struct acpi_srat_cpu_affinity *)header;
312-
if (!processor_affinity)
313-
return -EINVAL;
314310

315311
acpi_table_print_srat_entry(&header->common);
316312

@@ -327,8 +323,6 @@ acpi_parse_gicc_affinity(union acpi_subtable_headers *header,
327323
struct acpi_srat_gicc_affinity *processor_affinity;
328324

329325
processor_affinity = (struct acpi_srat_gicc_affinity *)header;
330-
if (!processor_affinity)
331-
return -EINVAL;
332326

333327
acpi_table_print_srat_entry(&header->common);
334328

@@ -347,8 +341,6 @@ acpi_parse_memory_affinity(union acpi_subtable_headers * header,
347341
struct acpi_srat_mem_affinity *memory_affinity;
348342

349343
memory_affinity = (struct acpi_srat_mem_affinity *)header;
350-
if (!memory_affinity)
351-
return -EINVAL;
352344

353345
acpi_table_print_srat_entry(&header->common);
354346

0 commit comments

Comments
 (0)