mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 18:37:58 -04:00
wifi: mwifiex: fix array of flexible structures warnings
There are two, just change them to have a "u8 data[]" type member, and add casts where needed. No binary changes. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220904212910.2c885310ebee.If7177ea588b56c405eee6e6df595e9efccdfb99a@changeid
This commit is contained in:
committed by
Kalle Valo
parent
c70a9d6783
commit
4cf4cf6eb0
@@ -2104,7 +2104,7 @@ struct mwifiex_fw_mef_entry {
|
||||
struct host_cmd_ds_mef_cfg {
|
||||
__le32 criteria;
|
||||
__le16 num_entries;
|
||||
struct mwifiex_fw_mef_entry mef_entry[];
|
||||
u8 mef_entry_data[];
|
||||
} __packed;
|
||||
|
||||
#define CONNECTION_TYPE_INFRA 0
|
||||
@@ -2254,7 +2254,7 @@ struct coalesce_receive_filt_rule {
|
||||
struct host_cmd_ds_coalesce_cfg {
|
||||
__le16 action;
|
||||
__le16 num_of_rules;
|
||||
struct coalesce_receive_filt_rule rule[];
|
||||
u8 rule_data[];
|
||||
} __packed;
|
||||
|
||||
struct host_cmd_ds_multi_chan_policy {
|
||||
|
||||
@@ -1435,7 +1435,7 @@ mwifiex_cmd_mef_cfg(struct mwifiex_private *priv,
|
||||
mef_entry = (struct mwifiex_fw_mef_entry *)pos;
|
||||
mef_entry->mode = mef->mef_entry[i].mode;
|
||||
mef_entry->action = mef->mef_entry[i].action;
|
||||
pos += sizeof(*mef_cfg->mef_entry);
|
||||
pos += sizeof(*mef_entry);
|
||||
|
||||
if (mwifiex_cmd_append_rpn_expression(priv,
|
||||
&mef->mef_entry[i], &pos))
|
||||
@@ -1631,7 +1631,7 @@ mwifiex_cmd_coalesce_cfg(struct mwifiex_private *priv,
|
||||
|
||||
coalesce_cfg->action = cpu_to_le16(cmd_action);
|
||||
coalesce_cfg->num_of_rules = cpu_to_le16(cfg->num_of_rules);
|
||||
rule = coalesce_cfg->rule;
|
||||
rule = (void *)coalesce_cfg->rule_data;
|
||||
|
||||
for (cnt = 0; cnt < cfg->num_of_rules; cnt++) {
|
||||
rule->header.type = cpu_to_le16(TLV_TYPE_COALESCE_RULE);
|
||||
|
||||
Reference in New Issue
Block a user