Skip to content

Commit fbd825f

Browse files
Sebastian Andrzej Siewiordavem330
authored andcommitted
net: hsr: Add __packed to struct hsr_sup_tlv.
Struct hsr_sup_tlv describes HW layout and therefore it needs a __packed attribute to ensure the compiler does not add any padding. Due to the size and __packed attribute of the structs that use hsr_sup_tlv it has no functional impact. Add __packed to struct hsr_sup_tlv. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 295de65 commit fbd825f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/hsr/hsr_main.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ struct hsr_vlan_ethhdr {
8383
struct hsr_sup_tlv {
8484
u8 HSR_TLV_type;
8585
u8 HSR_TLV_length;
86-
};
86+
} __packed;
8787

8888
/* HSR/PRP Supervision Frame data types.
8989
* Field names as defined in the IEC:2010 standard for HSR.

0 commit comments

Comments
 (0)