Re: [PATCH] power: bq24190_charger: suppress build warning
From: Sebastian Reichel
Date: Wed Jan 21 2015 - 11:05:54 EST
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@xxxxxxxxx>
> ---
> 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:
signature.asc
Description: Digital signature