Skip to content

Commit 4fbaf70

Browse files
committed
ACPI: NUMA: Use str_enabled_disabled() helper function
JIRA: https://issues.redhat.com/browse/RHEL-114091 Conflicts: drivers/acpi/numa/srat.c - dropped the stanza dealing with RISC-V INTC commit 359595b Author: Thorsten Blum <thorsten.blum@linux.dev> Date: Thu, 27 Mar 2025 13:26:04 +0000 Remove hard-coded strings by using the str_enabled_disabled() helper function. Acked-by: Bruno Faccini <bfaccini@nvidia.com> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
1 parent cc7ad3b commit 4fbaf70

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

drivers/acpi/numa/srat.c

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <linux/memblock.h>
1717
#include <linux/numa.h>
1818
#include <linux/nodemask.h>
19+
#include <linux/string_choices.h>
1920
#include <linux/topology.h>
2021

2122
static nodemask_t nodes_found_map = NODE_MASK_NONE;
@@ -92,8 +93,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
9293
pr_debug("SRAT Processor (id[0x%02x] eid[0x%02x]) in proximity domain %d %s\n",
9394
p->apic_id, p->local_sapic_eid,
9495
p->proximity_domain_lo,
95-
(p->flags & ACPI_SRAT_CPU_ENABLED) ?
96-
"enabled" : "disabled");
96+
str_enabled_disabled(p->flags & ACPI_SRAT_CPU_ENABLED));
9797
}
9898
break;
9999

@@ -105,8 +105,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
105105
(unsigned long long)p->base_address,
106106
(unsigned long long)p->length,
107107
p->proximity_domain,
108-
(p->flags & ACPI_SRAT_MEM_ENABLED) ?
109-
"enabled" : "disabled",
108+
str_enabled_disabled(p->flags & ACPI_SRAT_MEM_ENABLED),
110109
(p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) ?
111110
" hot-pluggable" : "",
112111
(p->flags & ACPI_SRAT_MEM_NON_VOLATILE) ?
@@ -121,8 +120,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
121120
pr_debug("SRAT Processor (x2apicid[0x%08x]) in proximity domain %d %s\n",
122121
p->apic_id,
123122
p->proximity_domain,
124-
(p->flags & ACPI_SRAT_CPU_ENABLED) ?
125-
"enabled" : "disabled");
123+
str_enabled_disabled(p->flags & ACPI_SRAT_CPU_ENABLED));
126124
}
127125
break;
128126

@@ -133,8 +131,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
133131
pr_debug("SRAT Processor (acpi id[0x%04x]) in proximity domain %d %s\n",
134132
p->acpi_processor_uid,
135133
p->proximity_domain,
136-
(p->flags & ACPI_SRAT_GICC_ENABLED) ?
137-
"enabled" : "disabled");
134+
str_enabled_disabled(p->flags & ACPI_SRAT_GICC_ENABLED));
138135
}
139136
break;
140137

@@ -152,8 +149,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
152149
*(u16 *)(&p->device_handle[0]),
153150
*(u16 *)(&p->device_handle[2]),
154151
p->proximity_domain,
155-
(p->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED) ?
156-
"enabled" : "disabled");
152+
str_enabled_disabled(p->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED));
157153
} else {
158154
/*
159155
* In this case we can rely on the device having a
@@ -163,8 +159,7 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)
163159
(char *)(&p->device_handle[0]),
164160
(char *)(&p->device_handle[8]),
165161
p->proximity_domain,
166-
(p->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED) ?
167-
"enabled" : "disabled");
162+
str_enabled_disabled(p->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED));
168163
}
169164
}
170165
break;

0 commit comments

Comments
 (0)