All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/gpio: Check return value to silence warning
@ 2014-08-07  4:40 ` Nick Krause
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Krause @ 2014-08-07  4:40 UTC (permalink / raw)
  To: Linus Walleij, Alexandre Courbot, open list:GPIO SUBSYSTEM, open list

Check for return value to fix the following error

drivers/gpio/gpio-sch311x.c: In function 'sch311x_gpio_probe':
drivers/gpio/gpio-sch311x.c:286:18: warning: ignoring return value of
'gpiochip_remove', declared with attribute warn_unused_result [-Wunused-result]

in the context we do not need to check but checking makes compiler happy.
With help from kernelnewbies.

Signed-off-by: Nick Krause <xerofoify@gmail.com>
---
 drivers/gpio/gpio-sch311x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-sch311x.c b/drivers/gpio/gpio-sch311x.c
index f942b80..af35e99 100644
--- a/drivers/gpio/gpio-sch311x.c
+++ b/drivers/gpio/gpio-sch311x.c
@@ -283,7 +283,7 @@ exit_err:
 	release_region(pdata->runtime_reg + GP1, 6);
 	/* release already registered chips */
 	for (--i; i >= 0; i--)
-		gpiochip_remove(&priv->blocks[i].chip);
+		WARN_ON(gpiochip_remove(&priv->blocks[i].chip));
 	return err;
 }
 
-- 
2.0.1

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

* [PATCH] drivers/gpio: Check return value to silence warning
@ 2014-08-07  4:40 ` Nick Krause
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Krause @ 2014-08-07  4:40 UTC (permalink / raw)
  To: Linus Walleij, Alexandre Courbot, open list:GPIO SUBSYSTEM, open list

Check for return value to fix the following error

drivers/gpio/gpio-sch311x.c: In function 'sch311x_gpio_probe':
drivers/gpio/gpio-sch311x.c:286:18: warning: ignoring return value of
'gpiochip_remove', declared with attribute warn_unused_result [-Wunused-result]

in the context we do not need to check but checking makes compiler happy.
With help from kernelnewbies.

Signed-off-by: Nick Krause <xerofoify@gmail.com>
---
 drivers/gpio/gpio-sch311x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-sch311x.c b/drivers/gpio/gpio-sch311x.c
index f942b80..af35e99 100644
--- a/drivers/gpio/gpio-sch311x.c
+++ b/drivers/gpio/gpio-sch311x.c
@@ -283,7 +283,7 @@ exit_err:
 	release_region(pdata->runtime_reg + GP1, 6);
 	/* release already registered chips */
 	for (--i; i >= 0; i--)
-		gpiochip_remove(&priv->blocks[i].chip);
+		WARN_ON(gpiochip_remove(&priv->blocks[i].chip));
 	return err;
 }
 
-- 
2.0.1


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

* Re: [PATCH] drivers/gpio: Check return value to silence warning
  2014-08-07  4:40 ` Nick Krause
  (?)
@ 2014-08-07  4:45 ` Alexandre Courbot
  -1 siblings, 0 replies; 3+ messages in thread
From: Alexandre Courbot @ 2014-08-07  4:45 UTC (permalink / raw)
  To: Nick Krause; +Cc: Linus Walleij, open list:GPIO SUBSYSTEM, open list

On Thu, Aug 7, 2014 at 1:40 PM, Nick Krause <xerofoiify@gmail.com> wrote:
> Check for return value to fix the following error
>
> drivers/gpio/gpio-sch311x.c: In function 'sch311x_gpio_probe':
> drivers/gpio/gpio-sch311x.c:286:18: warning: ignoring return value of
> 'gpiochip_remove', declared with attribute warn_unused_result [-Wunused-result]
>
> in the context we do not need to check but checking makes compiler happy.
> With help from kernelnewbies.

This patch is not needed: the warn_unused_result has been removed for
3.17, and gpiochip_remove will be changed to return void soon anyway.

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

end of thread, other threads:[~2014-08-07  4:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-07  4:40 [PATCH] drivers/gpio: Check return value to silence warning Nick Krause
2014-08-07  4:40 ` Nick Krause
2014-08-07  4:45 ` Alexandre Courbot

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.