* [PATCH] fix X[ ARRAY_SIZE(X) ]
@ 2009-01-17 14:51 Roel Kluin
2009-01-18 1:20 ` Len Brown
0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-01-17 14:51 UTC (permalink / raw)
To: len.brown; +Cc: linux-acpi
Ensure pcc->keymap[ ARRAY_SIZE(pcc->keymap) ] does not occur.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
index f30db36..c47a44d 100644
--- a/drivers/platform/x86/panasonic-laptop.c
+++ b/drivers/platform/x86/panasonic-laptop.c
@@ -507,7 +507,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));
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fix X[ ARRAY_SIZE(X) ]
2009-01-17 14:51 [PATCH] fix X[ ARRAY_SIZE(X) ] Roel Kluin
@ 2009-01-18 1:20 ` Len Brown
0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2009-01-18 1:20 UTC (permalink / raw)
To: Roel Kluin; +Cc: len.brown, linux-acpi
applied
thanks,
--
Len Brown, Intel Open Source Technology Center
On Sat, 17 Jan 2009, Roel Kluin wrote:
> Ensure pcc->keymap[ ARRAY_SIZE(pcc->keymap) ] does not occur.
>
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c
> index f30db36..c47a44d 100644
> --- a/drivers/platform/x86/panasonic-laptop.c
> +++ b/drivers/platform/x86/panasonic-laptop.c
> @@ -507,7 +507,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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-18 1:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-17 14:51 [PATCH] fix X[ ARRAY_SIZE(X) ] Roel Kluin
2009-01-18 1:20 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox