Re: [PATCH] staging: wlan-ng: replace rate macros

From: Luke Koch
Date: Sat Apr 15 2023 - 09:17:04 EST


On Sat, Apr 15, 2023 at 03:43:20PM +0300, Dan Carpenter wrote:
> Writing every sentence in imperative tense makes people sound like space
> aliens in human skin... You can if you want to but it's not a
> requirement in staging. There are two maintainers who have that
> requirement and the Outreachy people.

> > - struct p80211item_uint32 basicrate1;
> ^^^^^^^^^^
> This starts at 1 instead of 0.

> > + for (int i = 0; i < 8; i++) {
> ^^^^^
> Now it starts at zero.
>
> > + if (count >= i &&
> > + DOT11_RATE5_ISBASIC_GET(item->supprates[i - 1])) {
> ^^^^^
> This is an array underflow.
>
> regards,
> dan carpenter

Thank you for the heads up on the (lack of) necessity for alienspeak and
the code problem.
Starting at 0 should not have made a difference but I totally missed
that underflow... embarassing.
I'll make sure to fix that and resubmit the revised patch.

Thanks,
Luke