Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp205606imj; Thu, 14 Feb 2019 18:39:54 -0800 (PST) X-Google-Smtp-Source: AHgI3Ia2VajGxQ/CHKn6U3Zmp0upg6rSKc78sXv4kgrZJSYl5o+XcOJXQn5nZf1OCNct87hyd8CB X-Received: by 2002:a17:902:24a2:: with SMTP id w31mr7600143pla.216.1550198394021; Thu, 14 Feb 2019 18:39:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550198394; cv=none; d=google.com; s=arc-20160816; b=v9iO4oD1xwHI02fSF7kQAivH4JYBRJuBNlglsBcIKnjQ/poEcrsfi18Zp9dPpG4qqM aZLTUmDz+//fLCE0cavftGuXxnrrauCUzQaAId3uneSXknpRYA3xSTMyaHEjiq8QZukq w42PsgwfwEoGgsWVQ9SJqqokpsdwFoxzmbY7h73+PvVlXhlriQLFUp4HJdlwDmFd9HSE 9uMA2jqYv4vYiXn4Wy4Xv8Rd0aZbZDs9O326xedLHslath0Qbl2zWycZKt8Lr84ly1xe XBJo4HnLHxfSjV7PL0Q+MTDGh+SdFLGguzjGaMp0/6wcJJcpI1nuU11qkE/oDEW+1ASU Hb2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nO4/gl/X+Eil7D6Sirm8Ixk35Sx7uQbcfb0BPvjlT64=; b=JY4cYnPHdIWvNC6aXleYSDGd7Q/KINxgghd+S9nTcNhRynnPs/iVdXegOTVNsn35nw 6W0EGKnMphTGAntNjyH/4exTbXy5a9V3YRGmjkSdvIMGag6foH6ztrYU8H4WKPV9DXMA bZhvVo398BOrG+GYxGAoUtJwv4aDP2bzuVSG551i9fPie5sWKhTdnsxguPdHvbiiVUZj yfG6Liy5CwFBepzWa/9s4BrBEMYLT9mKMx/uj3v9y850ugqjEV3tH2IzQG3O5gppneZV e28AxGezKucp+adJpe2IdaZWeWipF6pNnsnsXa4h18QsQ9PmCRyHFNaEiNXwWVZWbCkC s60A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=z3RfqGt8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k20si4189307pls.116.2019.02.14.18.39.30; Thu, 14 Feb 2019 18:39:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=z3RfqGt8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732140AbfBOCLF (ORCPT + 99 others); Thu, 14 Feb 2019 21:11:05 -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: 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 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