ath10k: align ath10k_htt_txbuf structures
authorKalle Valo <kvalo@codeaurora.org>
Mon, 11 Feb 2019 16:48:08 +0000 (18:48 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 12 Feb 2019 18:49:35 +0000 (20:49 +0200)
With W=1 GCC warns:

drivers/net/wireless/ath/ath10k/htt.h:1746:1: warning: alignment 1 of 'struct ath10k_htt_txbuf_32' is less than 4 [-Wpacked-not-aligned]
drivers/net/wireless/ath/ath10k/htt.h:1753:1: warning: alignment 1 of 'struct ath10k_htt_txbuf_64' is less than 4 [-Wpacked-not-aligned]

Fix that by using __align(4). Compile tested only.

Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/htt.h

index 005fad9..d194bbe 100644 (file)
@@ -1743,14 +1743,14 @@ struct ath10k_htt_txbuf_32 {
        struct ath10k_htc_hdr htc_hdr;
        struct htt_cmd_hdr cmd_hdr;
        struct htt_data_tx_desc cmd_tx;
-} __packed;
+} __packed __aligned(4);
 
 struct ath10k_htt_txbuf_64 {
        struct htt_data_tx_desc_frag frags[2];
        struct ath10k_htc_hdr htc_hdr;
        struct htt_cmd_hdr cmd_hdr;
        struct htt_data_tx_desc_64 cmd_tx;
-} __packed;
+} __packed __aligned(4);
 
 struct ath10k_htt {
        struct ath10k *ar;