From: Tony Lindgren <tony@atomide.com>
To: NeilBrown <neilb@suse.de>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
Eduardo Valentin <eduardo.valentin@ti.com>,
Arnd Bergmann <arnd@arndb.de>, Nicolas Pitre <nico@fluxnic.net>,
linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: Latest build results - errors/warnings - lots of them
Date: Wed, 8 May 2013 15:17:20 -0700 [thread overview]
Message-ID: <20130508221720.GK32546@atomide.com> (raw)
In-Reply-To: <20130506124011.7e4c2806@notabene.brown>
* NeilBrown <neilb@suse.de> [130505 19:45]:
> On Thu, 2 May 2013 08:38:34 -0700 Tony Lindgren <tony@atomide.com> wrote:
>
> > > drivers/power/twl4030_charger.c: In function 'twl4030_charger_enable_usb':
> > > drivers/power/twl4030_charger.c:192:20: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result
> >
> > Neil, care to provide a fix for this? It's from your commit ab37813
> > (twl4030_charger: Allow charger to control the regulator that feeds it).
> >
> >
> This the sort of thing that might be appropriate?
Thanks looks good to me. Care to send it to the appropriate
mailing lists and maintainers for drivers/power?
Regards,
Tony
> From: NeilBrown <neilb@suse.de>
> Date: Mon, 6 May 2013 12:35:59 +1000
> Subject: [PATCH] twl4030_charger: don't ignore regulator_enable()
>
> regulator_enable() doesn't like being ignored. If it does fail there
> is nothing we can do except not set usb_enabled (which is necessary
> else a subsequent regulator_disable() will be unbalanced).
>
> We cannot usefully return an error here as errors from
> twl4030_charger_enable_usb() are ignored.
>
> Signed-off-by: NeilBrown <neilb@suse.de>
>
> diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
> index bed4581..8b0ec70 100644
> --- a/drivers/power/twl4030_charger.c
> +++ b/drivers/power/twl4030_charger.c
> @@ -189,8 +189,8 @@ static int twl4030_charger_enable_usb(struct twl4030_bci *bci, bool enable)
>
> /* Need to keep regulator on */
> if (!bci->usb_enabled) {
> - regulator_enable(bci->usb_reg);
> - bci->usb_enabled = 1;
> + if (regulator_enable(bci->usb_reg) == 0)
> + bci->usb_enabled = 1;
> }
>
> /* forcing the field BCIAUTOUSB (BOOT_BCI[1]) to 1 */
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: Latest build results - errors/warnings - lots of them
Date: Wed, 8 May 2013 15:17:20 -0700 [thread overview]
Message-ID: <20130508221720.GK32546@atomide.com> (raw)
In-Reply-To: <20130506124011.7e4c2806@notabene.brown>
* NeilBrown <neilb@suse.de> [130505 19:45]:
> On Thu, 2 May 2013 08:38:34 -0700 Tony Lindgren <tony@atomide.com> wrote:
>
> > > drivers/power/twl4030_charger.c: In function 'twl4030_charger_enable_usb':
> > > drivers/power/twl4030_charger.c:192:20: warning: ignoring return value of 'regulator_enable', declared with attribute warn_unused_result
> >
> > Neil, care to provide a fix for this? It's from your commit ab37813
> > (twl4030_charger: Allow charger to control the regulator that feeds it).
> >
> >
> This the sort of thing that might be appropriate?
Thanks looks good to me. Care to send it to the appropriate
mailing lists and maintainers for drivers/power?
Regards,
Tony
> From: NeilBrown <neilb@suse.de>
> Date: Mon, 6 May 2013 12:35:59 +1000
> Subject: [PATCH] twl4030_charger: don't ignore regulator_enable()
>
> regulator_enable() doesn't like being ignored. If it does fail there
> is nothing we can do except not set usb_enabled (which is necessary
> else a subsequent regulator_disable() will be unbalanced).
>
> We cannot usefully return an error here as errors from
> twl4030_charger_enable_usb() are ignored.
>
> Signed-off-by: NeilBrown <neilb@suse.de>
>
> diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c
> index bed4581..8b0ec70 100644
> --- a/drivers/power/twl4030_charger.c
> +++ b/drivers/power/twl4030_charger.c
> @@ -189,8 +189,8 @@ static int twl4030_charger_enable_usb(struct twl4030_bci *bci, bool enable)
>
> /* Need to keep regulator on */
> if (!bci->usb_enabled) {
> - regulator_enable(bci->usb_reg);
> - bci->usb_enabled = 1;
> + if (regulator_enable(bci->usb_reg) == 0)
> + bci->usb_enabled = 1;
> }
>
> /* forcing the field BCIAUTOUSB (BOOT_BCI[1]) to 1 */
next prev parent reply other threads:[~2013-05-08 22:17 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 8:17 Latest build results - errors/warnings - lots of them Russell King - ARM Linux
2013-04-30 8:17 ` Russell King - ARM Linux
2013-04-30 11:04 ` Arnd Bergmann
2013-04-30 11:04 ` Arnd Bergmann
2013-04-30 11:43 ` Dave Martin
2013-04-30 11:43 ` Dave Martin
2013-04-30 11:54 ` Arnd Bergmann
2013-04-30 11:54 ` Arnd Bergmann
2013-04-30 15:12 ` Nicolas Pitre
2013-04-30 15:12 ` Nicolas Pitre
2013-04-30 17:28 ` Dave Martin
2013-04-30 17:28 ` Dave Martin
2013-04-30 18:18 ` Nicolas Pitre
2013-04-30 18:18 ` Nicolas Pitre
2013-05-02 8:34 ` Russell King - ARM Linux
2013-05-02 8:34 ` Russell King - ARM Linux
2013-05-02 9:46 ` Russell King - ARM Linux
2013-05-02 9:46 ` Russell King - ARM Linux
2013-05-02 10:40 ` Dave Martin
2013-05-02 10:40 ` Dave Martin
2013-04-30 16:11 ` Tony Lindgren
2013-04-30 16:11 ` Tony Lindgren
2013-04-30 21:49 ` Tony Lindgren
2013-04-30 21:49 ` Tony Lindgren
2013-05-02 6:02 ` Shawn Guo
2013-05-02 6:02 ` Shawn Guo
2013-04-30 23:11 ` Arnd Bergmann
2013-04-30 23:11 ` Arnd Bergmann
2013-04-30 23:51 ` Tony Lindgren
2013-04-30 23:51 ` Tony Lindgren
2013-05-01 0:22 ` Tony Lindgren
2013-05-01 0:22 ` Tony Lindgren
2013-05-02 8:22 ` Russell King - ARM Linux
2013-05-02 8:22 ` Russell King - ARM Linux
2013-05-02 15:38 ` Tony Lindgren
2013-05-02 15:38 ` Tony Lindgren
2013-05-02 17:07 ` Eduardo Valentin
2013-05-02 17:07 ` Eduardo Valentin
2013-05-02 18:03 ` Arnd Bergmann
2013-05-02 18:03 ` Arnd Bergmann
2013-05-02 18:45 ` Eduardo Valentin
2013-05-02 18:45 ` Eduardo Valentin
2013-05-02 18:06 ` Felipe Balbi
2013-05-02 18:06 ` Felipe Balbi
2013-05-02 18:46 ` Eduardo Valentin
2013-05-02 18:46 ` Eduardo Valentin
2013-05-02 18:54 ` Russell King - ARM Linux
2013-05-02 18:54 ` Russell King - ARM Linux
2013-05-06 2:40 ` NeilBrown
2013-05-06 2:40 ` NeilBrown
2013-05-08 22:17 ` Tony Lindgren [this message]
2013-05-08 22:17 ` Tony Lindgren
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=20130508221720.GK32546@atomide.com \
--to=tony@atomide.com \
--cc=arnd@arndb.de \
--cc=eduardo.valentin@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=neilb@suse.de \
--cc=nico@fluxnic.net \
/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 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.