On Wed, 2022-05-25 at 13:53 -0700, Jakub Kicinski wrote: > On Mon, 23 May 2022 18:02:01 +0200 Johannes Berg wrote: > > From: Johannes Berg <johannes.berg@xxxxxxxxx> > > > > 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@xxxxxxxxxx> > > Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> > > Is there a chance to get this into net before the merge window is over? > I guess you can just apply it. Kalle? johannes