Re: linux-next: build warning after merge of the rtc tree

2019-03-27 Thread Joel Stanley
On Thu, 28 Mar 2019 at 01:59, Alexandre Belloni
 wrote:
>
> On 28/03/2019 01:36:21+, Joel Stanley wrote:
> > On Thu, 28 Mar 2019 at 01:23, Stephen Rothwell  
> > wrote:
> > >
> > > Hi all,
> > >
> > > After merging the rtc tree, today's linux-next build (x86_64 allmodconfig)
> > > produced this warning:
> > >
> > > drivers/rtc/rtc-aspeed.c: In function 'aspeed_rtc_read_time':
> > > drivers/rtc/rtc-aspeed.c:26:16: warning: unused variable 'flags' 
> > > [-Wunused-variable]
> > >   unsigned long flags;
> > > ^
> > > drivers/rtc/rtc-aspeed.c: In function 'aspeed_rtc_set_time':
> > > drivers/rtc/rtc-aspeed.c:57:16: warning: unused variable 'flags' 
> > > [-Wunused-variable]
> > >   unsigned long flags;
> > > ^
> > >
> > > Introduced by commit
> > >
> > >   7f4d485413fb ("rtc: Add ASPEED RTC driver")
> >
> > Alexandre, it looks like v3 went in instead of v4. Do you need me to
> > send a follow up?
> >
>
> I didn't get any v4, I'll fix it up in the tree.

Thanks!

(Sorry, I fat fingered v3 and then prepared a v4 but didn't send it.
The only change was removing the flags variable.)


Re: linux-next: build warning after merge of the rtc tree

2019-03-27 Thread Alexandre Belloni
On 28/03/2019 01:36:21+, Joel Stanley wrote:
> On Thu, 28 Mar 2019 at 01:23, Stephen Rothwell  wrote:
> >
> > Hi all,
> >
> > After merging the rtc tree, today's linux-next build (x86_64 allmodconfig)
> > produced this warning:
> >
> > drivers/rtc/rtc-aspeed.c: In function 'aspeed_rtc_read_time':
> > drivers/rtc/rtc-aspeed.c:26:16: warning: unused variable 'flags' 
> > [-Wunused-variable]
> >   unsigned long flags;
> > ^
> > drivers/rtc/rtc-aspeed.c: In function 'aspeed_rtc_set_time':
> > drivers/rtc/rtc-aspeed.c:57:16: warning: unused variable 'flags' 
> > [-Wunused-variable]
> >   unsigned long flags;
> > ^
> >
> > Introduced by commit
> >
> >   7f4d485413fb ("rtc: Add ASPEED RTC driver")
> 
> Alexandre, it looks like v3 went in instead of v4. Do you need me to
> send a follow up?
> 

I didn't get any v4, I'll fix it up in the tree.

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Re: linux-next: build warning after merge of the rtc tree

2019-03-27 Thread Joel Stanley
On Thu, 28 Mar 2019 at 01:23, Stephen Rothwell  wrote:
>
> Hi all,
>
> After merging the rtc tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
>
> drivers/rtc/rtc-aspeed.c: In function 'aspeed_rtc_read_time':
> drivers/rtc/rtc-aspeed.c:26:16: warning: unused variable 'flags' 
> [-Wunused-variable]
>   unsigned long flags;
> ^
> drivers/rtc/rtc-aspeed.c: In function 'aspeed_rtc_set_time':
> drivers/rtc/rtc-aspeed.c:57:16: warning: unused variable 'flags' 
> [-Wunused-variable]
>   unsigned long flags;
> ^
>
> Introduced by commit
>
>   7f4d485413fb ("rtc: Add ASPEED RTC driver")

Alexandre, it looks like v3 went in instead of v4. Do you need me to
send a follow up?

Cheers,

Joel


Re: linux-next: build warning after merge of the rtc tree

2017-07-05 Thread Alexandre Belloni
On 06/07/2017 at 07:54:58 +0200, Heiner Kallweit wrote:
> Am 06.07.2017 um 06:24 schrieb Stephen Rothwell:
> > Hi Alexandre,
> > 
> > After merging the rtc tree, today's linux-next build (powerpc
> > ppc64_defconfig) produced this warning:
> > 
> > drivers/rtc/rtc-ds1307.c: In function 'ds1307_get_time':
> > drivers/rtc/rtc-ds1307.c:342:26: warning: unused variable 'chip' 
> > [-Wunused-variable]
> >   const struct chip_desc *chip = &chips[ds1307->type];
> >   ^
> > 
> > Introduced by commit
> > 
> >   436c93db60a4 ("rtc: ds1307: factor out century bit handling")
> > 
> Right, if RTC_DRV_DS1307 is defined but RTC_DRV_DS1307_CENTURY is not
> then variable chip isn't used in ds1307_get_time.
> We could fix this by simply defining variable chip only if
> RTC_DRV_DS1307_CENTURY is defined.
> 
> However the current situation leaves the question why
> RTC_DRV_DS1307_CENTURY isn't set in the ppc64 defconfig.
> This config option should be n only temporarily if a system has
> to be fixed, see description of this option.
> Maybe we should set this config option to "default y" ?
> 

Well, the code would still have to be fixed.

> Rgds, Heiner

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


Re: linux-next: build warning after merge of the rtc tree

2017-07-05 Thread Heiner Kallweit
Am 06.07.2017 um 06:24 schrieb Stephen Rothwell:
> Hi Alexandre,
> 
> After merging the rtc tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> drivers/rtc/rtc-ds1307.c: In function 'ds1307_get_time':
> drivers/rtc/rtc-ds1307.c:342:26: warning: unused variable 'chip' 
> [-Wunused-variable]
>   const struct chip_desc *chip = &chips[ds1307->type];
>   ^
> 
> Introduced by commit
> 
>   436c93db60a4 ("rtc: ds1307: factor out century bit handling")
> 
Right, if RTC_DRV_DS1307 is defined but RTC_DRV_DS1307_CENTURY is not
then variable chip isn't used in ds1307_get_time.
We could fix this by simply defining variable chip only if
RTC_DRV_DS1307_CENTURY is defined.

However the current situation leaves the question why
RTC_DRV_DS1307_CENTURY isn't set in the ppc64 defconfig.
This config option should be n only temporarily if a system has
to be fixed, see description of this option.
Maybe we should set this config option to "default y" ?

Rgds, Heiner


RE: linux-next: build warning after merge of the rtc tree

2017-01-13 Thread Amelie DELAUNAY
Hi Stephen,

I'm going to send a patch to fix this warning.
Thanks,

Regards,
Amelie

> -Original Message-
> From: Stephen Rothwell [mailto:s...@canb.auug.org.au]
> Sent: vendredi 13 janvier 2017 04:18
> To: Alexandre Belloni 
> Cc: linux-n...@vger.kernel.org; linux-kernel@vger.kernel.org; Amelie
> DELAUNAY ; Mathieu Poirier
> 
> Subject: linux-next: build warning after merge of the rtc tree
> 
> Hi Alexandre,
> 
> After merging the rtc tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
> 
> In file included from drivers/rtc/rtc-stm32.c:14:0:
> drivers/rtc/rtc-stm32.c: In function 'stm32_rtc_probe':
> drivers/rtc/rtc-stm32.c:653:51: warning: large integer implicitly truncated to
> unsigned type [-Woverflow]
>   regmap_update_bits(rtc->dbp, PWR_CR, PWR_CR_DBP, ~PWR_CR_DBP);
>^
> include/linux/regmap.h:73:42: note: in definition of macro
> 'regmap_update_bits'
>   regmap_update_bits_base(map, reg, mask, val, NULL, false, false)
>   ^
> drivers/rtc/rtc-stm32.c: In function 'stm32_rtc_remove':
> drivers/rtc/rtc-stm32.c:675:51: warning: large integer implicitly truncated to
> unsigned type [-Woverflow]
>   regmap_update_bits(rtc->dbp, PWR_CR, PWR_CR_DBP, ~PWR_CR_DBP);
>^
> include/linux/regmap.h:73:42: note: in definition of macro
> 'regmap_update_bits'
>   regmap_update_bits_base(map, reg, mask, val, NULL, false, false)
>   ^
> 
> Introduced by commit
> 
>   4e64350f42e2 ("rtc: add STM32 RTC driver")
> 
> --
> Cheers,
> Stephen Rothwell


Re: linux-next: build warning after merge of the rtc tree

2017-01-10 Thread Alexandre Belloni
Hi,

On 10/01/2017 at 14:01:00 +1100, Stephen Rothwell wrote :
> Hi Alexandre,
> 
> After merging the rtc tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
> 
> drivers/rtc/rtc-armada38x.c: In function 'read_rtc_register_wa':
> drivers/rtc/rtc-armada38x.c:131:25: warning: 'index_max' may be used 
> uninitialized in this function [-Wmaybe-uninitialized]
>   return rtc->val_to_freq[index_max].value;
>  ^
> 
> Introduced by commit
> 
>   61cffa2438e3 ("rtc: armada38x: Follow the new recommendation for errata 
> implementation")

This is definitively a false positive, is it worth fixing it?


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


Re: linux-next: build warning after merge of the rtc tree

2016-07-11 Thread Alexandre Belloni
On 11/07/2016 at 10:23:51 +0200, Uwe Kleine-König wrote :
> Hello,
> 
> On Mon, Jul 11, 2016 at 06:12:08PM +1000, Stephen Rothwell wrote:
> > After merging the rtc tree, today's linux-next build (x86 64_allmodconfig)
> > produced this warning:
> > 
> > drivers/rtc/rtc-isl12057.c: In function 'isl12057_rtc_read_alarm':
> > drivers/rtc/rtc-isl12057.c:249:26: warning: unused variable 'alarm_secs' 
> > [-Wunused-variable]
> >   unsigned long rtc_secs, alarm_secs;
> >   ^
> > drivers/rtc/rtc-isl12057.c:249:16: warning: unused variable 'rtc_secs' 
> > [-Wunused-variable]
> >   unsigned long rtc_secs, alarm_secs;
> > ^
> > drivers/rtc/rtc-isl12057.c:248:18: warning: unused variable 'rtc_tm' 
> > [-Wunused-variable]
> >   struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
> >   ^
> > 
> > Introduced by commit
> > 
> >   4e30a585a343 ("rtc: isl12057: let the rtc core interpret the partial 
> > alarm")
> 
> Thanks for catching that. The obvious fix is:
> 
> diff --git a/drivers/rtc/rtc-isl12057.c b/drivers/rtc/rtc-isl12057.c
> index e0245fc6205e..0e7f0f52bfe4 100644
> --- a/drivers/rtc/rtc-isl12057.c
> +++ b/drivers/rtc/rtc-isl12057.c
> @@ -245,8 +245,7 @@ static int isl12057_rtc_update_alarm(struct device *dev, 
> int enable)
>  static int isl12057_rtc_read_alarm(struct device *dev, struct rtc_wkalrm 
> *alarm)
>  {
>   struct isl12057_rtc_data *data = dev_get_drvdata(dev);
> - struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
> - unsigned long rtc_secs, alarm_secs;
> + struct rtc_time *alarm_tm = &alarm->time;
>   u8 regs[ISL12057_A1_SEC_LEN];
>   unsigned int ir;
>   int ret;
> 
> Alexandre: Do you fixup, or should I send a proper patch for that?
> 

I fixed it up. I shouldn't have missed that one...

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


Re: linux-next: build warning after merge of the rtc tree

2016-07-11 Thread Uwe Kleine-König
Hello,

On Mon, Jul 11, 2016 at 06:12:08PM +1000, Stephen Rothwell wrote:
> After merging the rtc tree, today's linux-next build (x86 64_allmodconfig)
> produced this warning:
> 
> drivers/rtc/rtc-isl12057.c: In function 'isl12057_rtc_read_alarm':
> drivers/rtc/rtc-isl12057.c:249:26: warning: unused variable 'alarm_secs' 
> [-Wunused-variable]
>   unsigned long rtc_secs, alarm_secs;
>   ^
> drivers/rtc/rtc-isl12057.c:249:16: warning: unused variable 'rtc_secs' 
> [-Wunused-variable]
>   unsigned long rtc_secs, alarm_secs;
> ^
> drivers/rtc/rtc-isl12057.c:248:18: warning: unused variable 'rtc_tm' 
> [-Wunused-variable]
>   struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
>   ^
> 
> Introduced by commit
> 
>   4e30a585a343 ("rtc: isl12057: let the rtc core interpret the partial alarm")

Thanks for catching that. The obvious fix is:

diff --git a/drivers/rtc/rtc-isl12057.c b/drivers/rtc/rtc-isl12057.c
index e0245fc6205e..0e7f0f52bfe4 100644
--- a/drivers/rtc/rtc-isl12057.c
+++ b/drivers/rtc/rtc-isl12057.c
@@ -245,8 +245,7 @@ static int isl12057_rtc_update_alarm(struct device *dev, 
int enable)
 static int isl12057_rtc_read_alarm(struct device *dev, struct rtc_wkalrm 
*alarm)
 {
struct isl12057_rtc_data *data = dev_get_drvdata(dev);
-   struct rtc_time rtc_tm, *alarm_tm = &alarm->time;
-   unsigned long rtc_secs, alarm_secs;
+   struct rtc_time *alarm_tm = &alarm->time;
u8 regs[ISL12057_A1_SEC_LEN];
unsigned int ir;
int ret;

Alexandre: Do you fixup, or should I send a proper patch for that?

Best regards
Uwe


signature.asc
Description: PGP signature