From: Linus Walleij <linus.walleij@linaro.org>
To: Colin King <colin.king@canonical.com>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
kernel-janitors@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gpio: ep93xx: fix incorrect array element size check
Date: Thu, 6 Sep 2018 14:44:01 +0200 [thread overview]
Message-ID: <CACRpkdaHabhD_pW3XtDh+XzQ3d--r=qNRZVnhx44RV82p0boMA@mail.gmail.com> (raw)
In-Reply-To: <20180906115830.19386-1-colin.king@canonical.com>
On Thu, Sep 6, 2018 at 1:58 PM Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently the while loop checks for the end of the array using
> the size of egp->gc rather that the number of elements in the array,
> so fix this. Also, perform the array size check first as stylistically
> it is always good to bounds check on an array first before referencing
> the array (in this case, we're just computing the address of an
> element in an array so this is a moot point).
>
> Fixes: fd935fc421e7 ("gpio: ep93xx: Do not pingpong irq numbers")
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Oh that was really neat code! Thanks a lot.
Patch applied.
Yours,
Linus Walleij
next prev parent reply other threads:[~2018-09-06 12:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-06 11:58 [PATCH] gpio: ep93xx: fix incorrect array element size check Colin King
2018-09-06 12:44 ` Linus Walleij [this message]
2018-09-06 13:33 ` [PATCH] gpio: ep93xx: fix test for end of loop Dan Carpenter
2018-09-06 13:50 ` Colin Ian King
2018-09-06 14:48 ` Dan Carpenter
2018-09-06 15:18 ` Colin Ian King
2018-09-06 14:31 ` Linus Walleij
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='CACRpkdaHabhD_pW3XtDh+XzQ3d--r=qNRZVnhx44RV82p0boMA@mail.gmail.com' \
--to=linus.walleij@linaro.org \
--cc=colin.king@canonical.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@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 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).