Message ID | 20250103035122.50315-1-sunilvl@ventanamicro.com |
---|---|
State | New |
Headers | show |
Series | ACPI: tables: Use string choice helpers | expand |
On Fri, Jan 3, 2025 at 4:51 AM Sunil V L <sunilvl@ventanamicro.com> wrote: > > Use str_enabled_disabled string helpers for better readability and to > fix cocci warning. > > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/r/202501010947.0e3GVHNa-lkp@intel.com/ > Reported-by: Julia Lawall <julia.lawall@inria.fr> > Closes: https://lore.kernel.org/r/202501010947.0e3GVHNa-lkp@intel.com/ > Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> > --- > drivers/acpi/tables.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c > index 9e1b01c35070..2295abbecd14 100644 > --- a/drivers/acpi/tables.c > +++ b/drivers/acpi/tables.c > @@ -56,7 +56,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) > (struct acpi_madt_local_apic *)header; > pr_debug("LAPIC (acpi_id[0x%02x] lapic_id[0x%02x] %s)\n", > p->processor_id, p->id, > - (p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); > + str_enabled_disabled(p->lapic_flags & ACPI_MADT_ENABLED)); > } > break; > > @@ -66,7 +66,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) > (struct acpi_madt_local_x2apic *)header; > pr_debug("X2APIC (apic_id[0x%02x] uid[0x%02x] %s)\n", > p->local_apic_id, p->uid, > - (p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); > + str_enabled_disabled(p->lapic_flags & ACPI_MADT_ENABLED)); > } > break; > > @@ -160,7 +160,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) > (struct acpi_madt_local_sapic *)header; > pr_debug("LSAPIC (acpi_id[0x%02x] lsapic_id[0x%02x] lsapic_eid[0x%02x] %s)\n", > p->processor_id, p->id, p->eid, > - (p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); > + str_enabled_disabled(p->lapic_flags & ACPI_MADT_ENABLED)); > } > break; > > @@ -183,7 +183,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) > pr_debug("GICC (acpi_id[0x%04x] address[%llx] MPIDR[0x%llx] %s)\n", > p->uid, p->base_address, > p->arm_mpidr, > - (p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); > + str_enabled_disabled(p->flags & ACPI_MADT_ENABLED)); > > } > break; > @@ -218,7 +218,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) > > pr_debug("CORE PIC (processor_id[0x%02x] core_id[0x%02x] %s)\n", > p->processor_id, p->core_id, > - (p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); > + str_enabled_disabled(p->flags & ACPI_MADT_ENABLED)); > } > break; > > @@ -228,7 +228,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) > > pr_debug("RISC-V INTC (acpi_uid[0x%04x] hart_id[0x%llx] %s)\n", > p->uid, p->hart_id, > - (p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); > + str_enabled_disabled(p->flags & ACPI_MADT_ENABLED)); > } > break; > > -- Applied as 6.14 material, thanks!
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c index 9e1b01c35070..2295abbecd14 100644 --- a/drivers/acpi/tables.c +++ b/drivers/acpi/tables.c @@ -56,7 +56,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) (struct acpi_madt_local_apic *)header; pr_debug("LAPIC (acpi_id[0x%02x] lapic_id[0x%02x] %s)\n", p->processor_id, p->id, - (p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); + str_enabled_disabled(p->lapic_flags & ACPI_MADT_ENABLED)); } break; @@ -66,7 +66,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) (struct acpi_madt_local_x2apic *)header; pr_debug("X2APIC (apic_id[0x%02x] uid[0x%02x] %s)\n", p->local_apic_id, p->uid, - (p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); + str_enabled_disabled(p->lapic_flags & ACPI_MADT_ENABLED)); } break; @@ -160,7 +160,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) (struct acpi_madt_local_sapic *)header; pr_debug("LSAPIC (acpi_id[0x%02x] lsapic_id[0x%02x] lsapic_eid[0x%02x] %s)\n", p->processor_id, p->id, p->eid, - (p->lapic_flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); + str_enabled_disabled(p->lapic_flags & ACPI_MADT_ENABLED)); } break; @@ -183,7 +183,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) pr_debug("GICC (acpi_id[0x%04x] address[%llx] MPIDR[0x%llx] %s)\n", p->uid, p->base_address, p->arm_mpidr, - (p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); + str_enabled_disabled(p->flags & ACPI_MADT_ENABLED)); } break; @@ -218,7 +218,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) pr_debug("CORE PIC (processor_id[0x%02x] core_id[0x%02x] %s)\n", p->processor_id, p->core_id, - (p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); + str_enabled_disabled(p->flags & ACPI_MADT_ENABLED)); } break; @@ -228,7 +228,7 @@ void acpi_table_print_madt_entry(struct acpi_subtable_header *header) pr_debug("RISC-V INTC (acpi_uid[0x%04x] hart_id[0x%llx] %s)\n", p->uid, p->hart_id, - (p->flags & ACPI_MADT_ENABLED) ? "enabled" : "disabled"); + str_enabled_disabled(p->flags & ACPI_MADT_ENABLED)); } break;
Use str_enabled_disabled string helpers for better readability and to fix cocci warning. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/r/202501010947.0e3GVHNa-lkp@intel.com/ Reported-by: Julia Lawall <julia.lawall@inria.fr> Closes: https://lore.kernel.org/r/202501010947.0e3GVHNa-lkp@intel.com/ Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> --- drivers/acpi/tables.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)