linux-staging.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Luke Koch <lu.ale.koch@gmail.com>
To: Dan Carpenter <error27@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: wlan-ng: replace rate macros
Date: Sat, 15 Apr 2023 13:39:38 +0200	[thread overview]
Message-ID: <ZDqM+seGtevADusa@kernelhacking.kernelhacking.example.com> (raw)
In-Reply-To: <714c5d3f-438a-4633-a46e-127f876ffec4@kili.mountain>

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

      reply	other threads:[~2023-04-15 13:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-15 11:28 [PATCH] staging: wlan-ng: replace rate macros Luke Koch
2023-04-15 12:43 ` Dan Carpenter
2023-04-15 11:39   ` Luke Koch [this message]

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=ZDqM+seGtevADusa@kernelhacking.kernelhacking.example.com \
    --to=lu.ale.koch@gmail.com \
    --cc=error27@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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).