* [patch] pinctrl: nsp-gpio: forever loop in nsp_gpio_get_strength()
@ 2015-12-24 7:25 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2015-12-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Yendapally Reddy Dhananjaya Reddy
Cc: Ray Jui, Scott Branden, Jon Mason, linux-gpio,
bcm-kernel-feedback-list, kernel-janitors
There is a signedness bug here so the loop will never exit.
Fixes: 8bfcbbbcabe0 ('pinctrl: nsp: add gpio-a driver support for Broadcom NSP SoC')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c b/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c
index 34648f6..ac7b010 100644
--- a/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c
+++ b/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c
@@ -439,9 +439,10 @@ static int nsp_gpio_set_strength(struct nsp_gpio *chip, unsigned gpio,
static int nsp_gpio_get_strength(struct nsp_gpio *chip, unsigned gpio,
u16 *strength)
{
- unsigned int i, offset, shift;
+ unsigned int offset, shift;
u32 val;
unsigned long flags;
+ int i;
offset = NSP_GPIO_DRV_CTRL;
shift = gpio;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [patch] pinctrl: nsp-gpio: forever loop in nsp_gpio_get_strength()
@ 2015-12-24 7:25 ` Dan Carpenter
0 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2015-12-24 7:25 UTC (permalink / raw)
To: Linus Walleij, Yendapally Reddy Dhananjaya Reddy
Cc: Ray Jui, Scott Branden, Jon Mason, linux-gpio,
bcm-kernel-feedback-list, kernel-janitors
There is a signedness bug here so the loop will never exit.
Fixes: 8bfcbbbcabe0 ('pinctrl: nsp: add gpio-a driver support for Broadcom NSP SoC')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c b/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c
index 34648f6..ac7b010 100644
--- a/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c
+++ b/drivers/pinctrl/bcm/pinctrl-nsp-gpio.c
@@ -439,9 +439,10 @@ static int nsp_gpio_set_strength(struct nsp_gpio *chip, unsigned gpio,
static int nsp_gpio_get_strength(struct nsp_gpio *chip, unsigned gpio,
u16 *strength)
{
- unsigned int i, offset, shift;
+ unsigned int offset, shift;
u32 val;
unsigned long flags;
+ int i;
offset = NSP_GPIO_DRV_CTRL;
shift = gpio;
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch] pinctrl: nsp-gpio: forever loop in nsp_gpio_get_strength()
2015-12-24 7:25 ` Dan Carpenter
@ 2015-12-24 9:01 ` Linus Walleij
-1 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2015-12-24 9:01 UTC (permalink / raw)
To: Dan Carpenter
Cc: Yendapally Reddy Dhananjaya Reddy, Ray Jui, Scott Branden,
Jon Mason, linux-gpio@vger.kernel.org, bcm-kernel-feedback-list,
kernel-janitors
On Thu, Dec 24, 2015 at 8:25 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> There is a signedness bug here so the loop will never exit.
>
> Fixes: 8bfcbbbcabe0 ('pinctrl: nsp: add gpio-a driver support for Broadcom NSP SoC')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Merry Christmas!
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] pinctrl: nsp-gpio: forever loop in nsp_gpio_get_strength()
@ 2015-12-24 9:01 ` Linus Walleij
0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2015-12-24 9:01 UTC (permalink / raw)
To: Dan Carpenter
Cc: Yendapally Reddy Dhananjaya Reddy, Ray Jui, Scott Branden,
Jon Mason, linux-gpio@vger.kernel.org, bcm-kernel-feedback-list,
kernel-janitors
On Thu, Dec 24, 2015 at 8:25 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> There is a signedness bug here so the loop will never exit.
>
> Fixes: 8bfcbbbcabe0 ('pinctrl: nsp: add gpio-a driver support for Broadcom NSP SoC')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Merry Christmas!
Patch applied.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-24 9:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-24 7:25 [patch] pinctrl: nsp-gpio: forever loop in nsp_gpio_get_strength() Dan Carpenter
2015-12-24 7:25 ` Dan Carpenter
2015-12-24 9:01 ` Linus Walleij
2015-12-24 9:01 ` 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.