Skip to contentSkip to conversation

x86/shutdown: use DMI_MATCH2()

PATCH In review Jan Beulich 2 participants 2 messages Aug 5, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/shutdown: use DMI_MATCH2()

... to please Misra C:2012 Rule 9.3 (Arrays shall not be partially initialized).

Fixes d81dd3130351 ("x86/shutdown: change default reboot method preference")

---
Cc-ing REST since the two other x86 maintainers are away, yet the CI will want fixing.

xen/arch/x86/shutdown.c +2 -3
@@ -498,10 +498,9 @@ static const struct dmi_system_id __init
         .callback = override_reboot,
         .driver_data = (void *)(long)BOOT_EFI,
         .ident = "Acer TravelMate X514-51T",
-        .matches = {
+        DMI_MATCH2(
             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
-            DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate X514-51T"),
-        },
+            DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate X514-51T")),
     },
     { }
 };
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Jan Beulich

... to please Misra C:2012 Rule 9.3 (Arrays shall not be partially initialized).

Fixes d81dd3130351 ("x86/shutdown: change default reboot method preference")
Quoted 20 lines

---
Cc-ing REST since the two other x86 maintainers are away, yet the CI will want fixing.

xen/arch/x86/shutdown.c +2 -3
@@ -498,10 +498,9 @@ static const struct dmi_system_id __init
         .callback = override_reboot,
         .driver_data = (void *)(long)BOOT_EFI,
         .ident = "Acer TravelMate X514-51T",
-        .matches = {
+        DMI_MATCH2(
             DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
-            DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate X514-51T"),
-        },
+            DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate X514-51T")),
     },
     { }
 };