[PATCH] x86/shutdown: use DMI_MATCH2()

Jan Beulich posted 1 patch 3 months, 2 weeks ago
Failed in applying to current master (apply log)
[PATCH] x86/shutdown: use DMI_MATCH2()
Posted by Jan Beulich 3 months, 2 weeks ago
... to please Misra C:2012 Rule 9.3 (Arrays shall not be partially
initialized).

Fixes: d81dd3130351 ("x86/shutdown: change default reboot method preference")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
Cc-ing REST since the two other x86 maintainers are away, yet the CI will
want fixing.

--- a/xen/arch/x86/shutdown.c
+++ b/xen/arch/x86/shutdown.c
@@ -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")),
     },
     { }
 };
Re: [PATCH] x86/shutdown: use DMI_MATCH2()
Posted by Stefano Stabellini 3 months, 2 weeks ago
On Mon, 5 Aug 2024, Jan Beulich wrote:
> ... to please Misra C:2012 Rule 9.3 (Arrays shall not be partially
> initialized).
> 
> Fixes: d81dd3130351 ("x86/shutdown: change default reboot method preference")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>



> ---
> Cc-ing REST since the two other x86 maintainers are away, yet the CI will
> want fixing.
> 
> --- a/xen/arch/x86/shutdown.c
> +++ b/xen/arch/x86/shutdown.c
> @@ -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")),
>      },
>      { }
>  };
>