From patchwork Thu Feb 4 16:28:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 376705 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A22CFC433E6 for ; Thu, 4 Feb 2021 16:29:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 706BA64F65 for ; Thu, 4 Feb 2021 16:29:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238035AbhBDQ3I (ORCPT ); Thu, 4 Feb 2021 11:29:08 -0500 Received: from mail.kernel.org ([198.145.29.99]:46048 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237087AbhBDQ26 (ORCPT ); Thu, 4 Feb 2021 11:28:58 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E24A664F53; Thu, 4 Feb 2021 16:28:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612456098; bh=ytHJevR+zzgmOSRx6kpqUi3lL5tHgTyXFrb/w6GcbzM=; h=From:To:Cc:Subject:Date:From; b=XhN5ISGWyafpPs2enUgZVpXm4zoHkJUl3m57WK4TQXlYDlXQakC/EE45ItKpGRoI0 8jkXw0LehmGi2vqhtkiOKG/t9ZZb/0hk/ymjcKz6vwZ6OsCxlRfbzyrJQFPZIISCCk +Ktuk2PtXZLRDBnOkXp3gOpekw0U18MVL3NhndpAMu/Uc4GvtJjpS+FggRjHG4nc0y yRCHtbJ3hU4xz7+QH0MKPKlx4oFrjD4H4jggYp6DxQW3mX/Pb9/kFMNHER+HAuOMid HMaBg4AuIPf8IpT9XQRRo8+i/VAjoZ1PeCRO8lCBpDLSuONnnpCkrC2Uo0UIdjfnGB QjhhXrKfgbJXQ== From: Arnd Bergmann To: Lennert Buytenhek , Kalle Valo , "David S. Miller" , Jakub Kicinski Cc: Arnd Bergmann , "Gustavo A. R. Silva" , Romain Perier , Christophe JAILLET , Allen Pais , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] cwmwl8k: fix alignment constraints Date: Thu, 4 Feb 2021 17:28:04 +0100 Message-Id: <20210204162813.3159319-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Arnd Bergmann sturct mwl8k_dma_data contains a ieee80211_hdr structure, which is required to have at least two byte alignment, and this conflicts with the __packed attribute: vers/net/wireless/marvell/mwl8k.c:811:1: warning: alignment 1 of 'struct mwl8k_dma_data' is less than 2 [-Wpacked-not-aligned] Mark mwl8k_dma_data itself as having two-byte alignment to ensure the inner structure is properly aligned. Signed-off-by: Arnd Bergmann --- drivers/net/wireless/marvell/mwl8k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c index abf3b0233ccc..38eeab6369f7 100644 --- a/drivers/net/wireless/marvell/mwl8k.c +++ b/drivers/net/wireless/marvell/mwl8k.c @@ -808,7 +808,7 @@ struct mwl8k_dma_data { __le16 fwlen; struct ieee80211_hdr wh; char data[]; -} __packed; +} __packed __aligned(2); /* Routines to add/remove DMA header from skb. */ static inline void mwl8k_remove_dma_header(struct sk_buff *skb, __le16 qos)