From: Len Brown <lenb@kernel.org>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: Paul Mundt <lethal@linux-sh.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-acpi@vger.kernel.org
Subject: Re: [PATCH] panasonic-laptop: beyond ARRAY_SIZE of pcc->keymap
Date: Wed, 27 May 2009 18:14:37 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.00.0905271812310.25587@localhost.localdomain> (raw)
In-Reply-To: <4A1692F1.9010004@gmail.com>
This patch already shipped in 2.6.29.
2b190e76def5233c542f6025b4a133b1d4bd1a37
"panasonic-laptop: fix X[ ARRAY_SIZE(X) ]"
thanks,
Len Brown, Intel Open Source Technology Center
On Fri, 22 May 2009, Roel Kluin wrote:
> Do not go beyond ARRAY_SIZE of pcc->keymap
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> > Presumably you meant to send this to linux-acpi or linux-kernel instead
> > of linux-sh ;-)
>
> I was not sure, but linux-acpi is cc'ed now.
>
> diff --git a/drivers/misc/panasonic-laptop.c b/drivers/misc/panasonic-laptop.c
> index 4a1bc64..d82d1cc 100644
> --- a/drivers/misc/panasonic-laptop.c
> +++ b/drivers/misc/panasonic-laptop.c
> @@ -515,7 +515,7 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc)
>
> hkey_num = result & 0xf;
>
> - if (hkey_num < 0 || hkey_num > ARRAY_SIZE(pcc->keymap)) {
> + if (hkey_num < 0 || hkey_num >= ARRAY_SIZE(pcc->keymap)) {
> ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
> "hotkey number out of range: %d\n",
> hkey_num));
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2009-05-27 22:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4A15B5CA.9060907@gmail.com>
[not found] ` <20090522021933.GA10832@linux-sh.org>
2009-05-22 11:56 ` [PATCH] panasonic-laptop: beyond ARRAY_SIZE of pcc->keymap Roel Kluin
2009-05-27 22:14 ` Len Brown [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=alpine.LFD.2.00.0905271812310.25587@localhost.localdomain \
--to=lenb@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=lethal@linux-sh.org \
--cc=linux-acpi@vger.kernel.org \
--cc=roel.kluin@gmail.com \
/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