Skip to content

Commit

Permalink
staging: vt665x: fix alignment constraints
Browse files Browse the repository at this point in the history
Removing 2 instances of alignment warnings

drivers/staging/vt6655/rxtx.h:153:1: warning: alignment 1 of ‘struct vnt_cts’ is less than 2 [-Wpacked-not-aligned]
drivers/staging/vt6655/rxtx.h:163:1: warning: alignment 1 of ‘struct vnt_cts_fb’ is less than 2 [-Wpacked-not-aligned]

The root cause seems to be that _because_ struct ieee80211_cts is marked as __aligned(2),
this requires any encapsulating struct to also have an alignment of 2.

Fixes: 2faf12c ("staging: vt665x: fix alignment constraints")
Reviewed-by: Arnd Bergmann <[email protected]>
Signed-off-by: Edmundo Carmona Antoranz <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
eantoranz authored and gregkh committed Mar 18, 2021
1 parent d2d106f commit 2cafd46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/vt6655/rxtx.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ struct vnt_cts {
u16 reserved;
struct ieee80211_cts data;
u16 reserved2;
} __packed;
} __packed __aligned(2);

struct vnt_cts_fb {
struct vnt_phy_field b;
Expand All @@ -160,7 +160,7 @@ struct vnt_cts_fb {
__le16 cts_duration_ba_f1;
struct ieee80211_cts data;
u16 reserved2;
} __packed;
} __packed __aligned(2);

struct vnt_tx_fifo_head {
u8 tx_key[WLAN_KEY_LEN_CCMP];
Expand Down

0 comments on commit 2cafd46

Please sign in to comment.