diff mbox series

[RFC,2/4] x86/shutdown: address MISRA C:2012 Rule 9.3

Message ID b4781f1a558a32747f1aca53b6da50a2d4b61f1e.1698155925.git.nicola.vetrini@bugseng.com (mailing list archive)
State New, archived
Headers show
Series address violations of MISRA C Rule 9.3 | expand

Commit Message

Nicola Vetrini Oct. 24, 2023, 2:31 p.m. UTC
Partially explicitly initalized .matches arrays result in violations
of Rule 9.3; this is resolved by using designated initializers,
which is permitted by the Rule.

Mechanical changes.

Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
---
 xen/arch/x86/shutdown.c | 152 ++++++++++++++++++++--------------------
 1 file changed, 76 insertions(+), 76 deletions(-)

--
2.34.1

Comments

Jan Beulich Oct. 24, 2023, 2:56 p.m. UTC | #1
On 24.10.2023 16:31, Nicola Vetrini wrote:
> @@ -225,8 +225,8 @@ static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
>          .ident = "Dell OptiPlex 745",
>          .matches = {
>              DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> -            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
> -            DMI_MATCH(DMI_BOARD_NAME, "0MM599"),
> +            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
> +            [1] = DMI_MATCH(DMI_BOARD_NAME, "0MM599")
>          },
>      },
>      {    /* Handle problems with rebooting on Dell Optiplex 745 with 0KW626 */
> @@ -235,8 +235,8 @@ static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
>          .ident = "Dell OptiPlex 745",
>          .matches = {
>              DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> -            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
> -            DMI_MATCH(DMI_BOARD_NAME, "0KW626"),
> +            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
> +            [1] = DMI_MATCH(DMI_BOARD_NAME, "0KW626")
>          },
>      },
>      {    /* Handle problems with rebooting on Dell Optiplex 330 with 0KP561 */
> @@ -245,8 +245,8 @@ static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
>          .ident = "Dell OptiPlex 330",
>          .matches = {
>              DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> -            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 330"),
> -            DMI_MATCH(DMI_BOARD_NAME, "0KP561"),
> +            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 330"),
> +            [1] = DMI_MATCH(DMI_BOARD_NAME, "0KP561")
>          },
>      },
>      {    /* Handle problems with rebooting on Dell Optiplex 360 with 0T656F */
> @@ -255,8 +255,8 @@ static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
>          .ident = "Dell OptiPlex 360",
>          .matches = {
>              DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> -            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 360"),
> -            DMI_MATCH(DMI_BOARD_NAME, "0T656F"),
> +            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 360"),
> +            [1] = DMI_MATCH(DMI_BOARD_NAME, "0T656F")
>          },
>      },
>      {    /* Handle problems with rebooting on Dell OptiPlex 760 with 0G919G */
> @@ -265,8 +265,8 @@ static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
>          .ident = "Dell OptiPlex 760",
>          .matches = {
>              DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> -            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 760"),
> -            DMI_MATCH(DMI_BOARD_NAME, "0G919G"),
> +            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 760"),
> +            [1] = DMI_MATCH(DMI_BOARD_NAME, "0G919G")
>          },
>      },
>      {    /* Handle problems with rebooting on Dell 2400's */

Well, no, this is what absolutely should not happen: You're breaking
the code here, but initializing slot 0 twice in multiple instances.
From looking just at the patch I probably wouldn't have noticed, but
the "always elements 0 and 1 only" pattern made me "grep -lr", where
the issue became apparent. Otherwise I was about to suggest we shrink
array size to just 2 elements.

Jan
Nicola Vetrini Oct. 24, 2023, 3:05 p.m. UTC | #2
On 24/10/2023 16:56, Jan Beulich wrote:
> On 24.10.2023 16:31, Nicola Vetrini wrote:
>> @@ -225,8 +225,8 @@ static const struct dmi_system_id __initconstrel 
>> reboot_dmi_table[] = {
>>          .ident = "Dell OptiPlex 745",
>>          .matches = {
>>              DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
>> -            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
>> -            DMI_MATCH(DMI_BOARD_NAME, "0MM599"),
>> +            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
>> +            [1] = DMI_MATCH(DMI_BOARD_NAME, "0MM599")
>>          },
>>      },
>>      {    /* Handle problems with rebooting on Dell Optiplex 745 with 
>> 0KW626 */
>> @@ -235,8 +235,8 @@ static const struct dmi_system_id __initconstrel 
>> reboot_dmi_table[] = {
>>          .ident = "Dell OptiPlex 745",
>>          .matches = {
>>              DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
>> -            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
>> -            DMI_MATCH(DMI_BOARD_NAME, "0KW626"),
>> +            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
>> +            [1] = DMI_MATCH(DMI_BOARD_NAME, "0KW626")
>>          },
>>      },
>>      {    /* Handle problems with rebooting on Dell Optiplex 330 with 
>> 0KP561 */
>> @@ -245,8 +245,8 @@ static const struct dmi_system_id __initconstrel 
>> reboot_dmi_table[] = {
>>          .ident = "Dell OptiPlex 330",
>>          .matches = {
>>              DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
>> -            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 330"),
>> -            DMI_MATCH(DMI_BOARD_NAME, "0KP561"),
>> +            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 330"),
>> +            [1] = DMI_MATCH(DMI_BOARD_NAME, "0KP561")
>>          },
>>      },
>>      {    /* Handle problems with rebooting on Dell Optiplex 360 with 
>> 0T656F */
>> @@ -255,8 +255,8 @@ static const struct dmi_system_id __initconstrel 
>> reboot_dmi_table[] = {
>>          .ident = "Dell OptiPlex 360",
>>          .matches = {
>>              DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
>> -            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 360"),
>> -            DMI_MATCH(DMI_BOARD_NAME, "0T656F"),
>> +            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 360"),
>> +            [1] = DMI_MATCH(DMI_BOARD_NAME, "0T656F")
>>          },
>>      },
>>      {    /* Handle problems with rebooting on Dell OptiPlex 760 with 
>> 0G919G */
>> @@ -265,8 +265,8 @@ static const struct dmi_system_id __initconstrel 
>> reboot_dmi_table[] = {
>>          .ident = "Dell OptiPlex 760",
>>          .matches = {
>>              DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
>> -            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 760"),
>> -            DMI_MATCH(DMI_BOARD_NAME, "0G919G"),
>> +            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 760"),
>> +            [1] = DMI_MATCH(DMI_BOARD_NAME, "0G919G")
>>          },
>>      },
>>      {    /* Handle problems with rebooting on Dell 2400's */
> 
> Well, no, this is what absolutely should not happen: You're breaking
> the code here, but initializing slot 0 twice in multiple instances.
> From looking just at the patch I probably wouldn't have noticed, but
> the "always elements 0 and 1 only" pattern made me "grep -lr", where
> the issue became apparent. Otherwise I was about to suggest we shrink
> array size to just 2 elements.
> 
> Jan

Right, that was a shortcoming of my regex.
diff mbox series

Patch

diff --git a/xen/arch/x86/shutdown.c b/xen/arch/x86/shutdown.c
index 7619544d14da..382c948f81a4 100644
--- a/xen/arch/x86/shutdown.c
+++ b/xen/arch/x86/shutdown.c
@@ -188,8 +188,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_KBD,
         .ident = "Dell E520",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Dell DM061"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Dell DM061")
         },
     },
     {    /* Handle problems with rebooting on Dell 1300's */
@@ -197,8 +197,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_KBD,
         .ident = "Dell PowerEdge 1300",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-            DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 1300/")
         },
     },
     {    /* Handle problems with rebooting on Dell 300's */
@@ -206,8 +206,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_KBD,
         .ident = "Dell PowerEdge 300",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-            DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 300/"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 300/")
         },
     },
     {    /* Handle problems with rebooting on Dell Optiplex 745's SFF */
@@ -215,8 +215,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_KBD,
         .ident = "Dell OptiPlex 745",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745")
         },
     },
     {    /* Handle problems with rebooting on Dell Optiplex 745's DFF */
@@ -225,8 +225,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .ident = "Dell OptiPlex 745",
         .matches = {
             DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
-            DMI_MATCH(DMI_BOARD_NAME, "0MM599"),
+            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
+            [1] = DMI_MATCH(DMI_BOARD_NAME, "0MM599")
         },
     },
     {    /* Handle problems with rebooting on Dell Optiplex 745 with 0KW626 */
@@ -235,8 +235,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .ident = "Dell OptiPlex 745",
         .matches = {
             DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
-            DMI_MATCH(DMI_BOARD_NAME, "0KW626"),
+            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 745"),
+            [1] = DMI_MATCH(DMI_BOARD_NAME, "0KW626")
         },
     },
     {    /* Handle problems with rebooting on Dell Optiplex 330 with 0KP561 */
@@ -245,8 +245,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .ident = "Dell OptiPlex 330",
         .matches = {
             DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 330"),
-            DMI_MATCH(DMI_BOARD_NAME, "0KP561"),
+            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 330"),
+            [1] = DMI_MATCH(DMI_BOARD_NAME, "0KP561")
         },
     },
     {    /* Handle problems with rebooting on Dell Optiplex 360 with 0T656F */
@@ -255,8 +255,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .ident = "Dell OptiPlex 360",
         .matches = {
             DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 360"),
-            DMI_MATCH(DMI_BOARD_NAME, "0T656F"),
+            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 360"),
+            [1] = DMI_MATCH(DMI_BOARD_NAME, "0T656F")
         },
     },
     {    /* Handle problems with rebooting on Dell OptiPlex 760 with 0G919G */
@@ -265,8 +265,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .ident = "Dell OptiPlex 760",
         .matches = {
             DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 760"),
-            DMI_MATCH(DMI_BOARD_NAME, "0G919G"),
+            [0] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 760"),
+            [1] = DMI_MATCH(DMI_BOARD_NAME, "0G919G")
         },
     },
     {    /* Handle problems with rebooting on Dell 2400's */
@@ -274,8 +274,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_KBD,
         .ident = "Dell PowerEdge 2400",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
-            DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400")
         },
     },
     {    /* Handle problems with rebooting on Dell T5400's */
@@ -283,8 +283,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_KBD,
         .ident = "Dell Precision T5400",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation T5400"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation T5400")
         },
     },
     {    /* Handle problems with rebooting on Dell T7400's */
@@ -292,8 +292,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_KBD,
         .ident = "Dell Precision T7400",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation T7400"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation T7400")
         },
     },
     {    /* Handle problems with rebooting on HP laptops */
@@ -301,8 +301,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_KBD,
         .ident = "HP Compaq Laptop",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
-            DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq")
         },
     },
     {    /* Handle problems with rebooting on Dell XPS710 */
@@ -310,8 +310,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_KBD,
         .ident = "Dell XPS710",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Dell XPS710"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Dell XPS710")
         },
     },
     {    /* Handle problems with rebooting on Dell DXP061 */
@@ -319,8 +319,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_KBD,
         .ident = "Dell DXP061",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Dell DXP061"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Dell DXP061")
         },
     },
     {    /* Handle problems with rebooting on Sony VGN-Z540N */
@@ -328,8 +328,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_KBD,
         .ident = "Sony VGN-Z540N",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
-            DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "VGN-Z540N")
         },
     },
     {    /* Handle problems with rebooting on ASUS P4S800 */
@@ -337,8 +337,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_KBD,
         .ident = "ASUS P4S800",
         .matches = {
-            DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
-            DMI_MATCH(DMI_BOARD_NAME, "P4S800"),
+            [0] = DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."),
+            [1] = DMI_MATCH(DMI_BOARD_NAME, "P4S800")
         },
     },
     {    /* Handle reboot issue on Acer Aspire one */
@@ -346,8 +346,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_KBD,
         .ident = "Acer Aspire One A110",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
-            DMI_MATCH(DMI_PRODUCT_NAME, "AOA110"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "AOA110")
         },
     },
     {    /* Handle problems with rebooting on Apple MacBook5 */
@@ -355,8 +355,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Apple MacBook5",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "MacBook5"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "MacBook5")
         },
     },
     {    /* Handle problems with rebooting on Apple MacBookPro5 */
@@ -364,8 +364,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Apple MacBookPro5",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro5"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro5")
         },
     },
     {    /* Handle problems with rebooting on Apple Macmini3,1 */
@@ -373,8 +373,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Apple Macmini3,1",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Macmini3,1"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Macmini3,1")
         },
     },
     {    /* Handle problems with rebooting on the iMac9,1. */
@@ -382,8 +382,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Apple iMac9,1",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "iMac9,1"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "iMac9,1")
         },
     },
     {    /* Handle problems with rebooting on the Latitude E6320. */
@@ -391,8 +391,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Dell Latitude E6320",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6320"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6320")
         },
     },
     {    /* Handle problems with rebooting on the Latitude E5420. */
@@ -400,8 +400,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Dell Latitude E5420",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E5420"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E5420")
         },
     },
     {       /* Handle problems with rebooting on the Latitude E6220. */
@@ -409,8 +409,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Dell Latitude E6220",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6220"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6220")
         },
     },
     {    /* Handle problems with rebooting on the Latitude E6420. */
@@ -418,8 +418,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Dell Latitude E6420",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6420"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6420")
         },
     },
     {    /* Handle problems with rebooting on the OptiPlex 990. */
@@ -427,8 +427,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Dell OptiPlex 990",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 990"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 990")
         },
     },
     {    /* Handle problems with rebooting on the Precision M6600. */
@@ -436,8 +436,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Dell OptiPlex 990",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Precision M6600"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Precision M6600")
         },
     },
     {    /* Handle problems with rebooting on the Latitude E6520. */
@@ -445,8 +445,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Dell Latitude E6520",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6520"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6520")
         },
     },
     {       /* Handle problems with rebooting on the OptiPlex 790. */
@@ -454,8 +454,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Dell OptiPlex 790",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 790"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 790")
         },
     },
     {    /* Handle problems with rebooting on the OptiPlex 990. */
@@ -463,8 +463,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Dell OptiPlex 990",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 990"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 990")
         },
     },
     {    /* Handle problems with rebooting on the OptiPlex 390. */
@@ -472,8 +472,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Dell OptiPlex 390",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 390"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 390")
         },
     },
     {    /* Handle problems with rebooting on Dell OptiPlex 9020. */
@@ -481,8 +481,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_ACPI,
         .ident = "Dell OptiPlex 9020",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 9020"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 9020")
         },
     },
     {    /* Handle problems with rebooting on the Latitude E6320. */
@@ -490,8 +490,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Dell Latitude E6320",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6320"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6320")
         },
     },
     {    /* Handle problems with rebooting on the Latitude E6420. */
@@ -499,8 +499,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Dell Latitude E6420",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6420"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6420")
         },
     },
     {    /* Handle problems with rebooting on the Latitude E6520. */
@@ -508,8 +508,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_CF9,
         .ident = "Dell Latitude E6520",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6520"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6520")
         },
     },
     {    /* Handle problems with rebooting on Dell PowerEdge R540. */
@@ -517,8 +517,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_ACPI,
         .ident = "Dell PowerEdge R540",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R540"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R540")
         },
     },
     {    /* Handle problems with rebooting on Dell PowerEdge R740. */
@@ -526,8 +526,8 @@  static const struct dmi_system_id __initconstrel reboot_dmi_table[] = {
         .driver_data = (void *)(long)BOOT_ACPI,
         .ident = "Dell PowerEdge R740",
         .matches = {
-            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
-            DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R740"),
+            [0] = DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            [1] = DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R740")
         },
     },
     { }