SMBIOS: Drop now-unnecessary unions

Now that the refactoring is complete, the unions for the table header
are no longer needed. Therefore, drop them.

Change-Id: I4e170e84a12646386d3fd84ae973dd6c18f25809
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55910
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
Angel Pons 2021-06-28 17:42:40 +02:00 committed by Patrick Georgi
parent fff1b2f547
commit b554b7c51f
2 changed files with 18 additions and 144 deletions

View File

@ -10,14 +10,7 @@
static int smbios_write_intel_wifi(struct device *dev, int *handle, unsigned long *current)
{
struct smbios_type_intel_wifi {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 str;
u8 eos[2];
} __packed;

View File

@ -287,14 +287,7 @@ struct smbios_header {
} __packed;
struct smbios_type0 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 vendor;
u8 bios_version;
u16 bios_start_segment;
@ -312,14 +305,7 @@ struct smbios_type0 {
} __packed;
struct smbios_type1 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 manufacturer;
u8 product_name;
u8 version;
@ -354,14 +340,7 @@ typedef enum {
} smbios_board_type;
struct smbios_type2 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 manufacturer;
u8 product_name;
u8 version;
@ -414,14 +393,7 @@ typedef enum {
} smbios_enclosure_type;
struct smbios_type3 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 manufacturer;
u8 _type;
u8 version;
@ -441,14 +413,7 @@ struct smbios_type3 {
} __packed;
struct smbios_type4 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 socket_designation;
u8 processor_type;
u8 processor_family;
@ -559,14 +524,7 @@ enum smbios_cache_associativity {
#define SMBIOS_CACHE_OP_MODE_UNKNOWN 3
struct smbios_type7 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 socket_designation;
u16 cache_configuration;
u16 max_cache_size;
@ -680,14 +638,7 @@ struct port_information {
};
struct smbios_type8 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 internal_reference_designator;
u8 internal_connector_type;
u8 external_reference_designator;
@ -822,14 +773,7 @@ struct slot_peer_groups {
} __packed;
struct smbios_type9 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 slot_designation;
u8 slot_type;
u8 slot_data_bus_width;
@ -848,27 +792,13 @@ struct smbios_type9 {
} __packed;
struct smbios_type11 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 count;
u8 eos[2];
} __packed;
struct smbios_type15 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u16 area_length;
u16 header_offset;
u16 data_offset;
@ -898,14 +828,7 @@ enum {
#define SMBIOS_USE_EXTENDED_MAX_CAPACITY (1 << 31)
struct smbios_type16 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 location;
u8 use;
u8 memory_error_correction;
@ -917,14 +840,7 @@ struct smbios_type16 {
} __packed;
struct smbios_type17 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u16 phys_memory_array_handle;
u16 memory_error_information_handle;
u16 total_width;
@ -951,14 +867,7 @@ struct smbios_type17 {
} __packed;
struct smbios_type19 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u32 starting_address;
u32 ending_address;
u16 memory_array_handle;
@ -969,28 +878,14 @@ struct smbios_type19 {
} __packed;
struct smbios_type32 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 reserved[6];
u8 boot_status;
u8 eos[2];
} __packed;
struct smbios_type38 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 interface_type;
u8 ipmi_rev;
u8 i2c_slave_addr;
@ -1025,14 +920,7 @@ typedef enum {
#define SMBIOS_DEVICE_TYPE_COUNT 10
struct smbios_type41 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 reference_designation;
u8 device_type: 7;
u8 device_status: 1;
@ -1045,14 +933,7 @@ struct smbios_type41 {
} __packed;
struct smbios_type127 {
union {
struct {
u8 type;
u8 length;
u16 handle;
};
struct smbios_header header;
};
struct smbios_header header;
u8 eos[2];
} __packed;