From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 1C703C43381 for ; Fri, 15 Feb 2019 02:24:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D45662070C for ; Fri, 15 Feb 2019 02:24:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550197447; bh=mXlxt1knETNsPbz08XlQ6Ax4BHPYtQKIKFGoTSd47r4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=eMl7oHbW77slTaMWSWKWbAX55RqbBaJMaFca2Zucc95Feli2CZL8FGKkrEf8s4Ovh nnXKBET0L9E9FrS00ILJ5oeKWilIWwTIvlhaDC1fQfqEXkSW/biLpY21X48hb/t/rw PSwcu1IuV7LEf5vi1hLPCXS4NaUGRDZnfmPEW3EE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728932AbfBOCYF (ORCPT ); Thu, 14 Feb 2019 21:24:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:54250 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391604AbfBOCOV (ORCPT ); Thu, 14 Feb 2019 21:14:21 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BBA8121B68; Fri, 15 Feb 2019 02:14:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550196860; bh=mXlxt1knETNsPbz08XlQ6Ax4BHPYtQKIKFGoTSd47r4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BEhY3q1v2KwgLKrWqKWbqjZSHTEPP3SuVIsrV995fh4HhFO3T8fyO/2OuoHSLd5Lh PVo2jBqz5lrq9FDMk1Zc1Gd5yaiEkYFJHcr43vA4+bqvka3oLDyGK+k8g26JX8pvlz 64X9SNjQOBdFfHdzSiQHEkiSYoMwJqJNX7uNgfv4= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mathieu Malaterre , Johannes Berg , Sasha Levin , linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 37/40] mac80211: Add attribute aligned(2) to struct 'action' Date: Thu, 14 Feb 2019 21:13:10 -0500 Message-Id: <20190215021313.178476-37-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190215021313.178476-1-sashal@kernel.org> References: <20190215021313.178476-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mathieu Malaterre [ Upstream commit 7c53eb5d87bc21464da4268c3c0c47457b6d9c9b ] During refactor in commit 9e478066eae4 ("mac80211: fix MU-MIMO follow-MAC mode") a new struct 'action' was declared with packed attribute as: struct { struct ieee80211_hdr_3addr hdr; u8 category; u8 action_code; } __packed action; But since struct 'ieee80211_hdr_3addr' is declared with an aligned keyword as: struct ieee80211_hdr { __le16 frame_control; __le16 duration_id; u8 addr1[ETH_ALEN]; u8 addr2[ETH_ALEN]; u8 addr3[ETH_ALEN]; __le16 seq_ctrl; u8 addr4[ETH_ALEN]; } __packed __aligned(2); Solve the ambiguity of placing aligned structure in a packed one by adding the aligned(2) attribute to struct 'action'. This removes the following warning (W=1): net/mac80211/rx.c:234:2: warning: alignment 1 of 'struct ' is less than 2 [-Wpacked-not-aligned] Cc: Johannes Berg Suggested-by: Johannes Berg Signed-off-by: Mathieu Malaterre Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- net/mac80211/rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 7e9725d47557..e9820b5aad43 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -205,7 +205,7 @@ static void ieee80211_handle_mu_mimo_mon(struct ieee80211_sub_if_data *sdata, struct ieee80211_hdr_3addr hdr; u8 category; u8 action_code; - } __packed action; + } __packed __aligned(2) action; if (!sdata) return; -- 2.19.1