From: Sebastian Reichel <sre@kernel.org>
To: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] power: bq24190_charger: suppress build warning
Date: Wed, 21 Jan 2015 17:05:33 +0100 [thread overview]
Message-ID: <20150121160533.GF13715@earth.universe> (raw)
In-Reply-To: <1417704964-23155-1-git-send-email-prabhakar.csengg@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2047 bytes --]
Hi,
On Thu, Dec 04, 2014 at 02:56:04PM +0000, Lad, Prabhakar wrote:
> This patch fixes following build warning:
>
> In file included from include/linux/printk.h:261:0,
> from include/linux/kernel.h:13,
> from include/linux/list.h:8,
> from include/linux/module.h:9,
> from drivers/power/bq24190_charger.c:11:
> drivers/power/bq24190_charger.c: In function ‘bq24190_irq_handler_thread’:
> include/linux/dynamic_debug.h:86:20: warning: ‘ss_reg’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> __dynamic_dev_dbg(&descriptor, dev, fmt, \
> ^
> drivers/power/bq24190_charger.c:1211:5: note: ‘ss_reg’ was declared here
> u8 ss_reg, f_reg;
> ^
> In file included from include/linux/printk.h:261:0,
> from include/linux/kernel.h:13,
> from include/linux/list.h:8,
> from include/linux/module.h:9,
> from drivers/power/bq24190_charger.c:11:
> include/linux/dynamic_debug.h:86:20: warning: ‘f_reg’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> __dynamic_dev_dbg(&descriptor, dev, fmt, \
> ^
> drivers/power/bq24190_charger.c:1211:13: note: ‘f_reg’ was declared here
> u8 ss_reg, f_reg;
>
> Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
> ---
> drivers/power/bq24190_charger.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/bq24190_charger.c b/drivers/power/bq24190_charger.c
> index ad3ff8f..72e552d 100644
> --- a/drivers/power/bq24190_charger.c
> +++ b/drivers/power/bq24190_charger.c
> @@ -1208,7 +1208,7 @@ static irqreturn_t bq24190_irq_handler_thread(int irq, void *data)
> {
> struct bq24190_dev_info *bdi = data;
> bool alert_userspace = false;
> - u8 ss_reg, f_reg;
> + u8 ss_reg = 0, f_reg = 0;
> int ret;
>
> pm_runtime_get_sync(bdi->dev);
Thanks, applied.
-- Sebastian
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
prev parent reply other threads:[~2015-01-21 16:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-04 14:56 [PATCH] power: bq24190_charger: suppress build warning Lad, Prabhakar
2015-01-21 16:05 ` Sebastian Reichel [this message]
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=20150121160533.GF13715@earth.universe \
--to=sre@kernel.org \
--cc=dbaryshkov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=prabhakar.csengg@gmail.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