Просмотр исходного кода

qcacld-3.0: Add support for size 0 flexible length arrays

Convert size 0 variable length arrays to flexible length arrays.

Change-Id: I299800e11f65389d3cf3e616aeac5bcbb1a024e6
CRs-Fixed: 3690218
Aditya Kodukula 1 год назад
Родитель
Сommit
35d87fa945

+ 1 - 1
components/action_oui/dispatcher/inc/wlan_action_oui_public_struct.h

@@ -231,7 +231,7 @@ struct action_oui_request {
 	enum action_oui_id action_id;
 	uint32_t no_oui_extensions;
 	uint32_t total_no_oui_extensions;
-	struct action_oui_extension extension[0];
+	struct action_oui_extension extension[];
 };
 
 /**

+ 3 - 3
core/hdd/src/wlan_hdd_fips.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2017 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -39,13 +39,13 @@ struct iw_fips_test_request {
 	uint32_t key_len;
 	uint8_t  key[FIPS_KEY_LEN];
 	uint32_t data_len;
-	uint8_t  data[0];
+	uint8_t data[];
 };
 
 struct iw_fips_test_response {
 	uint32_t status;
 	uint32_t data_len;
-	uint8_t  data[0];
+	uint8_t data[];
 };
 
 

+ 3 - 3
core/mac/inc/sir_api.h

@@ -2873,7 +2873,7 @@ typedef struct {
 
 	uint32_t peer_event_number;
 	/* Variable  length field - Do not add anything after this */
-	uint8_t results[0];
+	uint8_t results[];
 } tSirLLStatsResults, *tpSirLLStatsResults;
 
 #ifdef WLAN_FEATURE_LINK_LAYER_STATS
@@ -3107,7 +3107,7 @@ struct wifi_peer_info {
 		uint32_t power_saving;
 		uint32_t num_rate;
 	};
-	struct wifi_rate_stat rate_stats[0];
+	struct wifi_rate_stat rate_stats[];
 };
 
 /**
@@ -3151,7 +3151,7 @@ struct wifi_interface_stats {
  */
 struct wifi_peer_stat {
 	uint32_t num_peers;
-	struct wifi_peer_info peer_info[0];
+	struct wifi_peer_info peer_info[];
 };
 
 /* wifi statistics bitmap  for getting statistics */

+ 3 - 3
uapi/linux/dbglog_common.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2011, 2014-2015 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -94,7 +94,7 @@ struct wlan_diag_data {
 	unsigned int word0;             /* type, length */
 	unsigned int target_time;
 	unsigned int code;              /* Diag log or event Code */
-	uint8_t payload[0];
+	uint8_t payload[];
 };
 
 struct dbglog_slot {
@@ -103,7 +103,7 @@ struct dbglog_slot {
 	unsigned int length;
 	unsigned int dropped;
 	/* max ATH6KL_FWLOG_PAYLOAD_SIZE bytes */
-	uint8_t payload[0];
+	uint8_t payload[];
 } __packed;
 
 typedef struct event_report_s {

+ 3 - 3
uapi/linux/pktlog_ac_fmt.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -207,7 +207,7 @@ struct ath_pktlog_txctl {
 struct ath_pktlog_tx_status {
 	struct ath_pktlog_hdr pl_hdr;
 	void *ds_status;
-	int32_t misc[0];        /* Can be used for HT specific or other misc info */
+	int32_t misc[];	/* Can be used for HT specific or other misc info */
 } __ATTRIB_PACK;
 
 struct ath_pktlog_msdu_info {
@@ -282,7 +282,7 @@ struct ath_pktlog_buf {
 	uint32_t msg_index;
 	/* Offset for read */
 	loff_t offset;
-	char log_data[0];
+	char log_data[];
 };
 
 #define PKTLOG_MOV_RD_IDX(_rd_offset, _log_buf, _log_size)  \