All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpiolib: change gpio pin from unsigned to signed in acpi callback
@ 2015-04-09 22:25 qipeng.zha
  2015-04-10  7:43 ` Mika Westerberg
  2015-04-27 13:21 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: qipeng.zha @ 2015-04-09 22:25 UTC (permalink / raw)
  To: linux-gpio; +Cc: linus.walleij, mika.westerberg, qipeng.zha, Alan Cox

From: "qipeng.zha" <qipeng.zha@intel.com>

The signed error will be wrongly used as valid gpio offset

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: qipeng.zha <qipeng.zha@intel.com>
---
 drivers/gpio/gpiolib-acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpiolib-acpi.c b/drivers/gpio/gpiolib-acpi.c
index df990f2..9674066 100644
--- a/drivers/gpio/gpiolib-acpi.c
+++ b/drivers/gpio/gpiolib-acpi.c
@@ -550,7 +550,7 @@ acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address,
 
 	length = min(agpio->pin_table_length, (u16)(pin_index + bits));
 	for (i = pin_index; i < length; ++i) {
-		unsigned pin = agpio->pin_table[i];
+		int pin = agpio->pin_table[i];
 		struct acpi_gpio_connection *conn;
 		struct gpio_desc *desc;
 		bool found;
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gpiolib: change gpio pin from unsigned to signed in acpi callback
  2015-04-09 22:25 [PATCH] gpiolib: change gpio pin from unsigned to signed in acpi callback qipeng.zha
@ 2015-04-10  7:43 ` Mika Westerberg
  2015-04-27 13:21 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Mika Westerberg @ 2015-04-10  7:43 UTC (permalink / raw)
  To: qipeng.zha; +Cc: linux-gpio, linus.walleij, Alan Cox

On Fri, Apr 10, 2015 at 06:25:10AM +0800, qipeng.zha wrote:
> From: "qipeng.zha" <qipeng.zha@intel.com>
> 
> The signed error will be wrongly used as valid gpio offset
> 
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> Signed-off-by: qipeng.zha <qipeng.zha@intel.com>

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gpiolib: change gpio pin from unsigned to signed in acpi callback
  2015-04-09 22:25 [PATCH] gpiolib: change gpio pin from unsigned to signed in acpi callback qipeng.zha
  2015-04-10  7:43 ` Mika Westerberg
@ 2015-04-27 13:21 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2015-04-27 13:21 UTC (permalink / raw)
  To: qipeng.zha; +Cc: linux-gpio, Westerberg, Mika, Alan Cox

On Fri, Apr 10, 2015 at 12:25 AM, qipeng.zha <qipeng.zha@intel.com> wrote:

> From: "qipeng.zha" <qipeng.zha@intel.com>
>
> The signed error will be wrongly used as valid gpio offset
>
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> Signed-off-by: qipeng.zha <qipeng.zha@intel.com>

Patch applied for fixes with Mika's ACK.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-27 13:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-09 22:25 [PATCH] gpiolib: change gpio pin from unsigned to signed in acpi callback qipeng.zha
2015-04-10  7:43 ` Mika Westerberg
2015-04-27 13:21 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.