From: Kalle Valo <kvalo@kernel.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH 04/12] wifi: rndis_wlan: fix array of flexible structures warning
Date: Mon, 05 Sep 2022 18:39:58 +0300 [thread overview]
Message-ID: <87tu5lde41.fsf@kernel.org> (raw)
In-Reply-To: <20220904212910.0e7ce5fdbcfb.I972158734def3f93b93a3858a087cbc2cca6337e@changeid> (Johannes Berg's message of "Sun, 4 Sep 2022 21:29:04 +0200")
Johannes Berg <johannes@sipsolutions.net> writes:
> From: Johannes Berg <johannes.berg@intel.com>
>
> Use "u8 bssid_data[]" with an appropriate cast. No binary
> changes.
>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
> drivers/net/wireless/rndis_wlan.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
> index 325933217b41..82a7458e01ae 100644
> --- a/drivers/net/wireless/rndis_wlan.c
> +++ b/drivers/net/wireless/rndis_wlan.c
> @@ -251,7 +251,7 @@ struct ndis_80211_bssid_ex {
>
> struct ndis_80211_bssid_list_ex {
> __le32 num_items;
> - struct ndis_80211_bssid_ex bssid[];
> + u8 bssid_data[];
> } __packed;
>
> struct ndis_80211_fixed_ies {
> @@ -2084,7 +2084,8 @@ static int rndis_check_bssid_list(struct usbnet *usbdev, u8 *match_bssid,
> netdev_dbg(usbdev->net, "%s(): buflen: %d\n", __func__, len);
>
> bssid_len = 0;
> - bssid = next_bssid_list_item(bssid_list->bssid, &bssid_len, buf, len);
> + bssid = next_bssid_list_item((void *)bssid_list->bssid_data,
> + &bssid_len, buf, len);
Same comment as in patch 2, I just feel the code gets worse because of a
compiler warning.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2022-09-05 15:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-04 19:29 [PATCH 01/12] wifi: ipw2100: fix warnings about non-kernel-doc Johannes Berg
2022-09-04 19:29 ` [PATCH 02/12] wifi: ipw2x00: fix array of flexible structures warnings Johannes Berg
2022-09-05 15:38 ` Kalle Valo
2022-09-22 6:09 ` Kalle Valo
2022-09-04 19:29 ` [PATCH 03/12] wifi: libertas: fix a couple of sparse warnings Johannes Berg
2022-09-04 19:29 ` [PATCH 04/12] wifi: rndis_wlan: fix array of flexible structures warning Johannes Berg
2022-09-05 15:39 ` Kalle Valo [this message]
2022-09-04 19:29 ` [PATCH 05/12] wifi: wl18xx: add some missing endian conversions Johannes Berg
2022-09-04 19:29 ` [PATCH 06/12] wifi: mwifiex: mark a variable unused Johannes Berg
2022-09-04 19:29 ` [PATCH 07/12] wifi: mwifiex: fix array of flexible structures warnings Johannes Berg
2022-09-06 22:20 ` Brian Norris
2022-09-07 6:57 ` Johannes Berg
2022-09-09 20:45 ` Brian Norris
2022-09-10 14:40 ` Johannes Berg
2022-09-04 19:29 ` [PATCH 08/12] wifi: mwifiex: fix endian conversion Johannes Berg
2022-09-06 22:22 ` Brian Norris
2022-09-04 19:29 ` [PATCH 09/12] wifi: mwifiex: fix endian annotations in casts Johannes Berg
2022-09-06 22:21 ` Brian Norris
2022-09-04 19:29 ` [PATCH 10/12] wifi: cw1200: remove RCU STA pointer handling in TX Johannes Berg
2022-09-04 19:29 ` [PATCH 11/12] wifi: cw1200: use get_unaligned_le64() Johannes Berg
2022-09-04 19:29 ` [PATCH 12/12] wifi: b43: remove empty switch statement Johannes Berg
2022-09-07 8:03 ` [PATCH 01/12] wifi: ipw2100: fix warnings about non-kernel-doc Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tu5lde41.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=johannes.berg@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).