Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2284459imu; Thu, 24 Jan 2019 10:07:04 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Ik7RHLAN5Q0Nijfi03ytOK9b5w+CCbuNoGy35t1VmdLBKbY+BEQGvXdSNqFH0O5mW1Gpn X-Received: by 2002:a63:40c6:: with SMTP id n189mr6724349pga.355.1548353223955; Thu, 24 Jan 2019 10:07:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548353223; cv=none; d=google.com; s=arc-20160816; b=urGzP2AsIiRzUGWttqAXMItZ/XGCh9cPzzAwYjoAyWuWCrjg6vzAzRQhcbN0Itgoky 6yla7S+WAKW4xQ1ZSol6VjXCdK13g59kSZKM7f2uWwpS4ZGtIvhTjM4AQ8y95qcwQTX0 hobnlcaAQVnryt8ikvKqcj+fShYwHEvx/tCblvr3oRLmCrBgIlMP7U/whjB4IW0zD131 RkK6cf8RRWa+I9Fssnj5tKX46eFghlz+nQu5jKcxaWuz6lTML13UuuuaubjQDVjbPUba G4+cQKiAEJMgAlGtF3nVMTkyT5PXwxAv3uyBUz8ltaPYp2YOJNEyCHnARfbTOFYbC52m s6rg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=fzySAr5RT4bnc+X0cIqdAC5wUwa0PpgnGMBYPkgYA/4=; b=oLW1Kpi13aw3IOx1eKIqUjrV5p2/CT1O3EjnUiuQleN6gIxpwwpgSp5VtnsKdD6a92 FEB7X/k7KwUJKuDOTw3KXWEkRzLdRWHsLx5ak0YTl+tqNm4B0nxZmgh95cBwkItRi92p 2jHOfwRZX71RlIv4mCAybJn8VkIX+WGO08J7E0Bc2hu2w/qgiH1yOopcbrIghrUtxQa3 tG6c145YWIF2ffvl9CbIyagYolTizamfsvaPmb9Q4llfVprUqM0S+a1zJvrMkwjBZCeE uSqrGzbJbWsFUcaZAPEVkaI6SHC1x1mFeNzXsgxNWuYYadqr8EvKuwSphheYiG8ME+jz GCpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=dPyeg2EV; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i12si21288846pgq.466.2019.01.24.10.06.47; Thu, 24 Jan 2019 10:07:03 -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=fail header.i=@gmail.com header.s=20161025 header.b=dPyeg2EV; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729230AbfAXSGM (ORCPT + 99 others); Thu, 24 Jan 2019 13:06:12 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:51926 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727919AbfAXSGL (ORCPT ); Thu, 24 Jan 2019 13:06:11 -0500 Received: by mail-wm1-f66.google.com with SMTP id b11so4184332wmj.1; Thu, 24 Jan 2019 10:06:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fzySAr5RT4bnc+X0cIqdAC5wUwa0PpgnGMBYPkgYA/4=; b=dPyeg2EVQTinioQfR/mLB8s01tLSf+kTCNj+8NP7Xt8ebWj/QGwtjSEYpBwp1knC6e 0xUiDhYlsRpxbGPoqxBV75Gx5UnrTOxiWvCrTWe0JtuvtBO92ksYqYUw3JyaUHGf5KPE ZXCoGQQStwygaTEqlJS0U4J+iSznzTjSoNcaEDNSbLhsabJgMFgjmOT6zsfFJQuvKYd1 18laPsC0NTnbT6Kwlr/RY+06B7QBy9IB60ljzLm+guFWN4bsDrzt3ntmbLMDgRceZmNt i76Cw/4tpiVeEG/6B8gs5UzpaVjXkMN6UQa6SzUU42Z5iIqhL922DLmGUw8NTRuhl9C2 +k3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=fzySAr5RT4bnc+X0cIqdAC5wUwa0PpgnGMBYPkgYA/4=; b=KK+JJXb6CzDi7KdR0iQ2TpNV3+4de9/0ObEQSGAaht0xis1CV+JbyYMCwvuC2tPLWG i5DiHtvtLb6B9a07SQEcSqYk0efcHg+ZftmSLsBINUSXe9q4KMNTLiWKTRZbQ57h3e88 QwLlukV0l9e3ALHSLY2QNQMFx2CSX7scvqrnsrcYSW6vlrJ8KLPSKcnfPVjjpv+wNX8I H82B78qL/BiSlqLgMWU8SQmDqhpx9t2GWLHA64pf1Z2DVwDKLcYGZ6Hsm+ZfrDbDVW89 n/W1AGkjMEEuWDxjqQbrjJXrlUMUKAB1kptjr6ZbGMQfXgXtHx8zwH1bMa8D4kqAA3HX 1IPw== X-Gm-Message-State: AJcUukf6YHTD+1P4EuIY6O/RAFLGU3Vu6pD4yIMAcCbeRM++BEZgHwvz ++1HwZTKk1K482zuPrtJLe8= X-Received: by 2002:a1c:7706:: with SMTP id t6mr3500992wmi.57.1548353169107; Thu, 24 Jan 2019 10:06:09 -0800 (PST) Received: from macbookpro.malat.net (bru31-1-78-225-224-134.fbx.proxad.net. [78.225.224.134]) by smtp.gmail.com with ESMTPSA id f10sm25380660wmb.35.2019.01.24.10.06.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 24 Jan 2019 10:06:08 -0800 (PST) Received: by macbookpro.malat.net (Postfix, from userid 1000) id 277A71143573; Thu, 24 Jan 2019 19:06:07 +0100 (CET) From: Mathieu Malaterre To: Johannes Berg Cc: Mathieu Malaterre , Johannes Berg , "David S. Miller" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mac80211: Remove attribute packed from struct 'action' Date: Thu, 24 Jan 2019 19:05:35 +0100 Message-Id: <20190124180535.20216-1-malat@debian.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 removing the packed attribute from struct. This seems to be the behavior of gcc anyway, since the following is still compiling: BUILD_BUG_ON(sizeof(action) != IEEE80211_MIN_ACTION_SIZE + 1); 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 Signed-off-by: Mathieu Malaterre --- 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 45aad3d3108c..709359650149 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -231,7 +231,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; + } action; if (!sdata) return; -- 2.19.2