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=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 E3C88C43381 for ; Fri, 15 Feb 2019 02:35:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A517321927 for ; Fri, 15 Feb 2019 02:35:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550198153; bh=kuE3uAdjVqbT+DieaXi3yRhRQeH16kNdYpAAQVZ6wlg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=H5E9ZieYa5Lb4K+8v/E7SgQz2zIglef/P40P4L170YlePPak+bQe0xsxjE25vdI1r EPFNawV5mX5p9Ch+c68sw98G8HWcdifffz0aVT9oqdpA4mItJwNtK/OtbujzkomdEK bB/pVYbUxFz7kKqz5uhBItgVTV4Pt0P7WG0mOyYY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732092AbfBOCLD (ORCPT ); Thu, 14 Feb 2019 21:11:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:51138 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732078AbfBOCLC (ORCPT ); Thu, 14 Feb 2019 21:11:02 -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 3992D222A1; Fri, 15 Feb 2019 02:11:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1550196662; bh=kuE3uAdjVqbT+DieaXi3yRhRQeH16kNdYpAAQVZ6wlg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z3RfqGt88dcMRRuBQNIKTFsCUNleU6ObL+NwME0u3VmCYjh9i1U6J2bLu/hjy3coB 8qfEstZ2LpvdJyXg7MdyXXTqZyndfg9a8/hSCTRfbUCMAJMOobaY3w+He+e83p6rUQ j5zsBbxQI1TVlCA6DO94YFJFBLY8g/M9WFq8Piyw= 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.20 71/77] mac80211: Add attribute aligned(2) to struct 'action' Date: Thu, 14 Feb 2019 21:08:49 -0500 Message-Id: <20190215020855.176727-71-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190215020855.176727-1-sashal@kernel.org> References: <20190215020855.176727-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 ef215d0e99b0..40f1a2986048 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -230,7 +230,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