Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3142062pxb; Sun, 31 Jan 2021 05:47:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOYxvOiAomu3YXxVzAcQzRV4oKHRwFAlT9s/jx8aqq5/w+m+45EZkawZb5Tv/vSmhUJyAL X-Received: by 2002:a17:906:9249:: with SMTP id c9mr622228ejx.416.1612100820452; Sun, 31 Jan 2021 05:47:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612100820; cv=none; d=google.com; s=arc-20160816; b=t7jYSJc88f64HJt41mCNZmraZi2Ut8my3DpBUGGGby57TuL26eITCl7i4vf6cHVf0I 7jowFyvxl/cy0o7WNWGJpttxUrNVwuTpeh3Ngj31wLG2wMZNcN7cI/u6qeGPw1i38AS7 Z+DHqFGa88OohogPaSaTbhSvFlS/tpCJFuXd9rVMk43tPT87VBfZCtAnheB6+Q8uhl4i h/KDsA9lhVkP4uP9mjgsMKjmVMSum/je3o5b1vexmaN4CYKDpXMr9aNEgLB+DYnPfxDr 1U/AzCuSdadx/Xt30a3/r+w4x2ygl0uOCZ8whWlFSlvvcBUk8M7DsPgUg4CUkWJNehBY RoFQ== 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=3DIFrGJnG9BAvhmCtFeOswXkxK/mgNThvfOrJqPAeNw=; b=z6KlRTAnki30b4tHrK0OJoIhLpLs5BkGWh/J86U29VgWLCdfpjDMhtrdbv3ivmUCAN Y2QhY6/JU3yUpFmnNHKxXh7FDEwt9L24aDLFF++B2QJkEFlpJoj4wiY1oN7YVtXJOTtx iIy/Gg8PcYoRXQNEyhvJG8CWDXLfQUqJe3BirIPxBTymhGR3vK5AOIrd0mlwx5rtaDIO c1GdWR9EKdOdfUjc8umcM0c5yc3Bp1BHR6Ek0khx8OKnjTNt6nNON2kvh9+3LgJEFRnf /SUkB6YPPgnsZTvaym/hXn4Pz51cgMlAW2vhw3pyNlJA1+5LONZuCRhMfoYucGMMKJIS k6Hg== 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 r2si8812474edv.308.2021.01.31.05.46.37; Sun, 31 Jan 2021 05:47:00 -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 S231756AbhAaNps (ORCPT + 99 others); Sun, 31 Jan 2021 08:45:48 -0500 Received: from paleale.coelho.fi ([176.9.41.70]:42898 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231493AbhAaLcV (ORCPT ); Sun, 31 Jan 2021 06:32:21 -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 1l6AXy-004131-QW; Sun, 31 Jan 2021 13:05:39 +0200 From: Luca Coelho To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org Date: Sun, 31 Jan 2021 13:05:24 +0200 Message-Id: X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210131110533.887130-1-luca@coelho.fi> References: <20210131110533.887130-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: [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.29.2