Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1790906pxb; Fri, 5 Feb 2021 01:15:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAkHRH+3iMkpzUS1RFwn79feiNGByVVNYqgkQUmZHATXJyrTKCJpd7/sVDS2kg/hz+PmOF X-Received: by 2002:aa7:c90a:: with SMTP id b10mr2594271edt.216.1612516508263; Fri, 05 Feb 2021 01:15:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612516508; cv=none; d=google.com; s=arc-20160816; b=yPs5WRuEgCZyiTigcPVoA7ZMMVPnIvY+aSMZyY7vDT5R6F0xODbEcVb86kdNuOpFDs 7N1qmBJE84BEJx6DUHFvilmJ8xQE1j4j01DV1gBbfzzXYhumAJKvSORUc5VYgqDMyTwF EF6z/l6F0IbWGv/At9g7IH70e7QZIpM82p8k4nSWbKtUlZAZQiox8Q335WznKi3VCyFU h+jeLABahJXBiTJsMFwkwLwYheFUAY17P4MMy7U2HUmnoHhMjW7aqjtmxbG8Fw18vi/p w1nv9wSecpHpPkBh6WaaU0DjEhgOMb9NYjrAxNE6c/ouLukLbioUE39Opl64AYufsrLN 7aEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from; bh=H6zjoL9ZoKvAcZPBalDm1BvkvCtnstAFl9wFf1fmpxk=; b=SIk9KAi339pL80wM9kpYvfOS/jQr9m6ZzOknTsYl0LC7XbK1X/RDk3sOXuCB2kH0uK OYIKc1CKokD6b/1ov6AAqeNcYg5k1POx4YAZ6GICzRdVu79WbuT5PDdK9wRz+Pe28tJk M6Nl9Kd97T3FI5NnGFa50IaztslF6W13aM+9YDfnrWMKvSWBSl/H9qd82VMbtuF571c1 6fB+0uVhD9eeVt1rlk+0HBLRbVFX0Epa7k0RNmuHYxuvjkaN8ScO49NxM7QW8XxW3wOW xoiAC7mAWgc/XgqbgsdZFHvLl/Ph8m152U7UFhEYC92IKxMk5p+ny6OdeVfNVdBltgZv qEQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si5384254ejm.620.2021.02.05.01.14.44; Fri, 05 Feb 2021 01:15:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230126AbhBEJMJ (ORCPT + 99 others); Fri, 5 Feb 2021 04:12:09 -0500 Received: from paleale.coelho.fi ([176.9.41.70]:43746 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S230111AbhBEJHf (ORCPT ); Fri, 5 Feb 2021 04:07:35 -0500 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1l7x4i-0044i1-5T; Fri, 05 Feb 2021 11:06:48 +0200 From: Luca Coelho To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org Date: Fri, 5 Feb 2021 11:06:33 +0200 Message-Id: X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210205090642.1553849-1-luca@coelho.fi> References: <20210205090642.1553849-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on farmhouse.coelho.fi X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP autolearn=ham autolearn_force=no version=3.4.4 Subject: [RESEND PATCH 03/12] iwlwifi: fw api: make hdr a zero-size array again Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg In struct iwl_tx_cmd, there's no risk (as Arnd implied) that we might access this as an array, as it's really not an array and cannot be - there's only a single 802.11 header per frame. The only reason for this member is for being able to access it a bit more nicely. On the other hand, this structure is used as a sub-struct in a few places, and then some compilers (e.g. clang with certain options) complain as you shouldn't have structs with variable- length fields embedded in other structs. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/api/tx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/tx.h b/drivers/net/wireless/intel/iwlwifi/fw/api/tx.h index 644ced53160a..95038b1a8c6f 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/tx.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/tx.h @@ -238,7 +238,7 @@ struct iwl_tx_cmd { __le16 pm_frame_timeout; __le16 reserved4; u8 payload[0]; - struct ieee80211_hdr hdr[]; + struct ieee80211_hdr hdr[0]; } __packed; /* TX_CMD_API_S_VER_6 */ struct iwl_dram_sec_info { -- 2.30.0