From patchwork Thu Dec 7 02:50:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit miriam.rachel.korenblit@intel.com X-Patchwork-Id: 751025 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XsdUIZdC" Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C45592688 for ; Wed, 6 Dec 2023 00:50:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701852602; x=1733388602; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=l46o3zGvA0qQFk1E1X6W/S3RFaABpV9jWyvdkaqvHHg=; b=XsdUIZdC24dgXCCWGwJBjND55scMDIfHrIVLA6si1Iuk8AAQBxjgsXj4 8Il5N7Ar9W6NNL3adwIc0Q8n2TJnH4Z4HKwScJT2jJqUpHQ//J1QcY6iO G61WWhB67Zu+uJt6imdbLo3esormQ5OPE0Qa0Ue/7FbZbHSycTfOjF02w FjubEosCOPcgihym+SDutpxxYzPnzp0dU2EdxqyC5QwE9ILVd+N5VnfEb 497m4bF4dJuS0R45XHZQVqVYqicK70Zxlj7DKviL+5i90dedhvNdts8uc byzMOKExxfD0HtTf+T1czUAgAzmD/GO0zcgpancsLDHEMpFJKdMfmK7hz Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10915"; a="397916580" X-IronPort-AV: E=Sophos;i="6.04,254,1695711600"; d="scan'208";a="397916580" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2023 00:50:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10915"; a="805575412" X-IronPort-AV: E=Sophos;i="6.04,254,1695711600"; d="scan'208";a="805575412" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Dec 2023 00:50:00 -0800 From: Miri Korenblit miriam.rachel.korenblit@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Miri Korenblit Subject: [PATCH 09/13] wifi: iwlwifi: fw: file: don't use [0] for variable arrays Date: Thu, 7 Dec 2023 04:50:14 +0200 Message-Id: <20231207044813.367a2c77b9be.I4964ec8ca1d30c7c3163f9873814c8205a1a14eb@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231207025018.1022929-1-miriam.rachel.korenblit@intel.com> References: <20231207025018.1022929-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited X-Spam-Level: **** From: Johannes Berg This causes fortify warnings when compiled against recent kernels with recent compilers, and generally is not supported in the kernel anymore. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/file.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/file.h b/drivers/net/wireless/intel/iwlwifi/fw/file.h index 03f6e520145f..7bbc55ccc3ce 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/file.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/file.h @@ -20,7 +20,7 @@ struct iwl_ucode_header { __le32 init_size; /* bytes of init code */ __le32 init_data_size; /* bytes of init data */ __le32 boot_size; /* bytes of bootstrap code */ - u8 data[0]; /* in same order as sizes */ + u8 data[]; /* in same order as sizes */ } v1; struct { __le32 build; /* build number */ @@ -29,7 +29,7 @@ struct iwl_ucode_header { __le32 init_size; /* bytes of init code */ __le32 init_data_size; /* bytes of init data */ __le32 boot_size; /* bytes of bootstrap code */ - u8 data[0]; /* in same order as sizes */ + u8 data[]; /* in same order as sizes */ } v2; } u; };