From: David Brownell <david-b@pacbell.net>
To: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: Richard Purdie <rpurdie@linux.intel.com>,
Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: Re: leds: just ignore invalid GPIOs in leds-gpio
Date: Tue, 7 Apr 2009 17:51:49 -0700 [thread overview]
Message-ID: <200904071751.49507.david-b@pacbell.net> (raw)
In-Reply-To: <alpine.LRH.2.00.0904071359010.23019@vixen.sonytel.be>
On Tuesday 07 April 2009, Geert Uytterhoeven wrote:
> | drivers/leds/leds-gpio.c:85: warning: 'return' with no value, in function
> | returning non-void
>
> So what should we return here? -ENODEV? -EINVAL? Anything else?
Success: 0. The point is to ignore them, not fail!
See the appended.
- Dave
========== CUT HERE
From: David Brownell <dbrownell@users.sourceforge.net>
Fix build problems with leds-gpio:
CC drivers/leds/leds-gpio.o
drivers/leds/leds-gpio.c: In function 'create_gpio_led':
drivers/leds/leds-gpio.c:85: warning: 'return' with no value, in function returning non-void
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
drivers/leds/leds-gpio.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -82,7 +84,7 @@ static int __devinit create_gpio_led(con
if (!gpio_is_valid(template->gpio)) {
printk(KERN_INFO "Skipping unavilable LED gpio %d (%s)\n",
template->gpio, template->name);
- return;
+ return 0;
}
ret = gpio_request(template->gpio, template->name);
next prev parent reply other threads:[~2009-04-08 0:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200904062059.n36Kxlum026774@hera.kernel.org>
2009-04-07 12:00 ` Geert Uytterhoeven
2009-04-08 0:51 ` David Brownell [this message]
2009-04-08 13:09 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200904071751.49507.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®