From: Jakub Kicinski <kuba@kernel.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, Johannes Berg <johannes.berg@intel.com>
Subject: Re: [PATCH] wifi: libertas: use variable-size data in assoc req/resp cmd
Date: Wed, 25 May 2022 13:53:26 -0700 [thread overview]
Message-ID: <20220525135326.1da8fe36@kernel.org> (raw)
In-Reply-To: <20220523180200.115fa27fbece.Ie66d874b047e7afad63900aa2df70f031711147e@changeid>
On Mon, 23 May 2022 18:02:01 +0200 Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> The firmware has a 512 limit here, but we use less, so gcc
> starts complaining about it:
>
> drivers/net/wireless/marvell/libertas/cfg.c:1198:63: warning: array subscript ‘struct cmd_ds_802_11_associate_response[0]’ is partly outside array bounds of ‘unsigned char[203]’ [-Warray-bounds]
> 1198 | "aid 0x%04x\n", status, le16_to_cpu(resp->statuscode),
> | ^~
>
> Since we size the command and response buffer per our needs
> and not per the firmware maximum, change to a variable size
> data array and put the 512 only into a comment.
>
> In the end, that's actually what the code always wanted, and
> it simplifies the code that used to subtract the fixed size
> buffer size in two places.
>
> Reported-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Is there a chance to get this into net before the merge window is over?
next prev parent reply other threads:[~2022-05-25 20:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-23 16:02 [PATCH] wifi: libertas: use variable-size data in assoc req/resp cmd Johannes Berg
2022-05-25 20:53 ` Jakub Kicinski [this message]
2022-05-25 21:18 ` Johannes Berg
2022-05-27 11:40 ` Kalle Valo
2022-05-27 22:36 ` Jakub Kicinski
2022-05-27 11:43 ` Kalle Valo
2022-05-27 11:44 ` Johannes Berg
2022-05-27 12:02 ` Kalle Valo
2022-05-30 9:13 ` 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=20220525135326.1da8fe36@kernel.org \
--to=kuba@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 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.