All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes.berg@intel.com>
Subject: [PATCH 04/12] wifi: rndis_wlan: fix array of flexible structures warning
Date: Sun,  4 Sep 2022 21:29:04 +0200	[thread overview]
Message-ID: <20220904212910.0e7ce5fdbcfb.I972158734def3f93b93a3858a087cbc2cca6337e@changeid> (raw)
In-Reply-To: <20220904212910.8169e8c9090c.I0357e80cc86be2d4ac6205d1f53568444dcf7c9b@changeid>

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);
 
 	/* Device returns incorrect 'num_items'. Workaround by ignoring the
 	 * received 'num_items' and walking through full bssid buffer instead.
-- 
2.37.2


  parent reply	other threads:[~2022-09-04 19:29 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 ` Johannes Berg [this message]
2022-09-05 15:39   ` [PATCH 04/12] wifi: rndis_wlan: fix array of flexible structures warning Kalle Valo
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=20220904212910.0e7ce5fdbcfb.I972158734def3f93b93a3858a087cbc2cca6337e@changeid \
    --to=johannes@sipsolutions.net \
    --cc=johannes.berg@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.