@@ -608,18 +608,12 @@ acpi_rs_get_list_length(u8 *aml_buffer,
608
608
609
609
case ACPI_RESOURCE_NAME_SERIAL_BUS :{
610
610
611
- /* Avoid undefined behavior: member access within misaligned address */
612
-
613
- struct aml_resource_common_serialbus
614
- common_serial_bus ;
615
- memcpy (& common_serial_bus , aml_resource ,
616
- sizeof (common_serial_bus ));
617
-
618
611
minimum_aml_resource_length =
619
612
acpi_gbl_resource_aml_serial_bus_sizes
620
- [common_serial_bus .type ];
613
+ [aml_resource -> common_serial_bus .type ];
621
614
extra_struct_bytes +=
622
- common_serial_bus .resource_length -
615
+ aml_resource -> common_serial_bus .
616
+ resource_length -
623
617
minimum_aml_resource_length ;
624
618
break ;
625
619
}
@@ -688,16 +682,10 @@ acpi_rs_get_list_length(u8 *aml_buffer,
688
682
*/
689
683
if (acpi_ut_get_resource_type (aml_buffer ) ==
690
684
ACPI_RESOURCE_NAME_SERIAL_BUS ) {
691
-
692
- /* Avoid undefined behavior: member access within misaligned address */
693
-
694
- struct aml_resource_common_serialbus common_serial_bus ;
695
- memcpy (& common_serial_bus , aml_resource ,
696
- sizeof (common_serial_bus ));
697
-
698
685
buffer_size =
699
686
acpi_gbl_resource_struct_serial_bus_sizes
700
- [common_serial_bus .type ] + extra_struct_bytes ;
687
+ [aml_resource -> common_serial_bus .type ] +
688
+ extra_struct_bytes ;
701
689
} else {
702
690
buffer_size =
703
691
acpi_gbl_resource_struct_sizes [resource_index ] +
0 commit comments