From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752152AbcF1HCW (ORCPT ); Tue, 28 Jun 2016 03:02:22 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:37007 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750871AbcF1HCV (ORCPT ); Tue, 28 Jun 2016 03:02:21 -0400 Date: Tue, 28 Jun 2016 08:03:12 +0100 From: Lee Jones To: Steve Twiss Cc: LINUXKERNEL , Geert Uytterhoeven , Support Opensource Subject: Re: [PATCH V1] mfd: da9053: fix compiler warning message for uninitialised variable Message-ID: <20160628070312.GG6720@dell> References: <20160627151048.342473FAB9@swsrvapps-01.diasemi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20160627151048.342473FAB9@swsrvapps-01.diasemi.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Jun 2016, Steve Twiss wrote: > From: Steve Twiss > > Fix compiler warning caused by an uninitialised variable inside > da9052_group_write() function. Defaulting the value to zero covers > the trivial case. > > Signed-off-by: Steve Twiss > Reported-by: Geert Uytterhoeven > > --- > Hi Lee, > > This compiler warning was found and reported by Geert Uytterhoeven as > part of the "Build regressions/improvements in v4.7-rc5" thread. > > - https://lkml.org/lkml/2016/6/27/126 > > Regards, > Steve > > > include/linux/mfd/da9052/da9052.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied to -fixes. > diff --git a/include/linux/mfd/da9052/da9052.h b/include/linux/mfd/da9052/da9052.h > index c18a4c1..ce9230a 100644 > --- a/include/linux/mfd/da9052/da9052.h > +++ b/include/linux/mfd/da9052/da9052.h > @@ -171,7 +171,7 @@ static inline int da9052_group_read(struct da9052 *da9052, unsigned char reg, > static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg, > unsigned reg_cnt, unsigned char *val) > { > - int ret; > + int ret = 0; > int i; > > for (i = 0; i < reg_cnt; i++) { -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog