FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 02-22-2011, 04:52 PM
Manoj Iyer
 
Default thinkpad-acpi: avoid keymap pitfall

From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>

Change the code so that it will use the correct size for keymap entries.
Do it in a way that makes it harder to screw it up in the future.

Reported-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
(cherry picked from commit fc6e756894b703952fd277a1f98a5d93e7ba847a)

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>

BugLink: http://launchpad.net/bugs/722747
---
drivers/platform/x86/thinkpad_acpi.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index a48c80a..babc4d4 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -3093,7 +3093,8 @@ static const struct tpacpi_quirk tpacpi_hotkey_qtable[] __initconst = {
TPACPI_Q_IBM('1', 'D', TPACPI_HK_Q_INIMASK), /* X22, X23, X24 */
};

-typedef u16 tpacpi_keymap_t[TPACPI_HOTKEY_MAP_LEN];
+typedef u16 tpacpi_keymap_entry_t;
+typedef tpacpi_keymap_entry_t tpacpi_keymap_t[TPACPI_HOTKEY_MAP_LEN];

static int __init hotkey_init(struct ibm_init_struct *iibm)
{
@@ -3230,7 +3231,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
};

#define TPACPI_HOTKEY_MAP_SIZE sizeof(tpacpi_keymap_t)
-#define TPACPI_HOTKEY_MAP_TYPESIZE sizeof(tpacpi_keymap_t[0])
+#define TPACPI_HOTKEY_MAP_TYPESIZE sizeof(tpacpi_keymap_entry_t)

int res, i;
int status;
--
1.7.1


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 02-22-2011, 05:11 PM
Tim Gardner
 
Default thinkpad-acpi: avoid keymap pitfall

On 02/22/2011 10:52 AM, Manoj Iyer wrote:

From: Henrique de Moraes Holschuh<hmh@hmh.eng.br>

Change the code so that it will use the correct size for keymap entries.
Do it in a way that makes it harder to screw it up in the future.

Reported-by: Jaime Velasco Juan<jsagarribay@gmail.com>
Signed-off-by: Henrique de Moraes Holschuh<hmh@hmh.eng.br>
Signed-off-by: Matthew Garrett<mjg@redhat.com>
(cherry picked from commit fc6e756894b703952fd277a1f98a5d93e7ba847a)

Signed-off-by: Manoj Iyer<manoj.iyer@canonical.com>

BugLink: http://launchpad.net/bugs/722747
---
drivers/platform/x86/thinkpad_acpi.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index a48c80a..babc4d4 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -3093,7 +3093,8 @@ static const struct tpacpi_quirk tpacpi_hotkey_qtable[] __initconst = {
TPACPI_Q_IBM('1', 'D', TPACPI_HK_Q_INIMASK), /* X22, X23, X24 */
};

-typedef u16 tpacpi_keymap_t[TPACPI_HOTKEY_MAP_LEN];
+typedef u16 tpacpi_keymap_entry_t;
+typedef tpacpi_keymap_entry_t tpacpi_keymap_t[TPACPI_HOTKEY_MAP_LEN];

static int __init hotkey_init(struct ibm_init_struct *iibm)
{
@@ -3230,7 +3231,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
};

#define TPACPI_HOTKEY_MAP_SIZE sizeof(tpacpi_keymap_t)
-#define TPACPI_HOTKEY_MAP_TYPESIZE sizeof(tpacpi_keymap_t[0])
+#define TPACPI_HOTKEY_MAP_TYPESIZE sizeof(tpacpi_keymap_entry_t)

int res, i;
int status;


I see this commit as far down as 2.6.36.y, but not 2.6.35.y.

Acked-by: Tim Gardner <tim.gardner@canonical.com>

--
Tim Gardner tim.gardner@canonical.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 02-22-2011, 05:24 PM
Brad Figg
 
Default thinkpad-acpi: avoid keymap pitfall

On 02/22/2011 09:52 AM, Manoj Iyer wrote:

From: Henrique de Moraes Holschuh<hmh@hmh.eng.br>

Change the code so that it will use the correct size for keymap entries.
Do it in a way that makes it harder to screw it up in the future.

Reported-by: Jaime Velasco Juan<jsagarribay@gmail.com>
Signed-off-by: Henrique de Moraes Holschuh<hmh@hmh.eng.br>
Signed-off-by: Matthew Garrett<mjg@redhat.com>
(cherry picked from commit fc6e756894b703952fd277a1f98a5d93e7ba847a)

Signed-off-by: Manoj Iyer<manoj.iyer@canonical.com>

BugLink: http://launchpad.net/bugs/722747
---
drivers/platform/x86/thinkpad_acpi.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index a48c80a..babc4d4 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -3093,7 +3093,8 @@ static const struct tpacpi_quirk tpacpi_hotkey_qtable[] __initconst = {
TPACPI_Q_IBM('1', 'D', TPACPI_HK_Q_INIMASK), /* X22, X23, X24 */
};

-typedef u16 tpacpi_keymap_t[TPACPI_HOTKEY_MAP_LEN];
+typedef u16 tpacpi_keymap_entry_t;
+typedef tpacpi_keymap_entry_t tpacpi_keymap_t[TPACPI_HOTKEY_MAP_LEN];

static int __init hotkey_init(struct ibm_init_struct *iibm)
{
@@ -3230,7 +3231,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
};

#define TPACPI_HOTKEY_MAP_SIZE sizeof(tpacpi_keymap_t)
-#define TPACPI_HOTKEY_MAP_TYPESIZE sizeof(tpacpi_keymap_t[0])
+#define TPACPI_HOTKEY_MAP_TYPESIZE sizeof(tpacpi_keymap_entry_t)

int res, i;
int status;


Acked-by: Brad Figg <brad.figg@canonical.com>

--
Brad Figg brad.figg@canonical.com http://www.canonical.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 02-22-2011, 05:31 PM
Manoj Iyer
 
Default thinkpad-acpi: avoid keymap pitfall

I have already proposed this for stable 2.6.35+

-----------------------------------------------------
Manoj Iyer
Ubuntu/Canonical
Hardware Enablement Team
------------------------------------------------------



On Tue, Feb 22, 2011 at 12:11 PM, Tim Gardner <tim.gardner@canonical.com> wrote:
> On 02/22/2011 10:52 AM, Manoj Iyer wrote:
>>
>> From: Henrique de Moraes Holschuh<hmh@hmh.eng.br>
>>
>> Change the code so that it will use the correct size for keymap entries.
>> Do it in a way that makes it harder to screw it up in the future.
>>
>> Reported-by: Jaime Velasco Juan<jsagarribay@gmail.com>
>> Signed-off-by: Henrique de Moraes Holschuh<hmh@hmh.eng.br>
>> Signed-off-by: Matthew Garrett<mjg@redhat.com>
>> (cherry picked from commit fc6e756894b703952fd277a1f98a5d93e7ba847a)
>>
>> Signed-off-by: Manoj Iyer<manoj.iyer@canonical.com>
>>
>> BugLink: http://launchpad.net/bugs/722747
>> ---
>> *drivers/platform/x86/thinkpad_acpi.c | * *5 +++--
>> *1 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/platform/x86/thinkpad_acpi.c
>> b/drivers/platform/x86/thinkpad_acpi.c
>> index a48c80a..babc4d4 100644
>> --- a/drivers/platform/x86/thinkpad_acpi.c
>> +++ b/drivers/platform/x86/thinkpad_acpi.c
>> @@ -3093,7 +3093,8 @@ static const struct tpacpi_quirk
>> tpacpi_hotkey_qtable[] __initconst = {
>> * * * *TPACPI_Q_IBM('1', 'D', TPACPI_HK_Q_INIMASK), /* X22, X23, X24 */
>> *};
>>
>> -typedef u16 tpacpi_keymap_t[TPACPI_HOTKEY_MAP_LEN];
>> +typedef u16 tpacpi_keymap_entry_t;
>> +typedef tpacpi_keymap_entry_t tpacpi_keymap_t[TPACPI_HOTKEY_MAP_LEN];
>>
>> *static int __init hotkey_init(struct ibm_init_struct *iibm)
>> *{
>> @@ -3230,7 +3231,7 @@ static int __init hotkey_init(struct ibm_init_struct
>> *iibm)
>> * * * *};
>>
>> *#define TPACPI_HOTKEY_MAP_SIZE * * * * * * * *sizeof(tpacpi_keymap_t)
>> -#define TPACPI_HOTKEY_MAP_TYPESIZE * * sizeof(tpacpi_keymap_t[0])
>> +#define TPACPI_HOTKEY_MAP_TYPESIZE * * sizeof(tpacpi_keymap_entry_t)
>>
>> * * * *int res, i;
>> * * * *int status;
>
> I see this commit as far down as 2.6.36.y, but not 2.6.35.y.
>
> Acked-by: Tim Gardner <tim.gardner@canonical.com>
>
> --
> Tim Gardner tim.gardner@canonical.com
>

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 04:51 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org