Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1682038 > unrolled thread
| Started by | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| First post | 2017-07-06 06:30 +0200 |
| Last post | 2017-07-06 09:00 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
linux-next: build warning after merge of the rtc tree Stephen Rothwell <sfr@canb.auug.org.au> - 2017-07-06 06:30 +0200
Re: linux-next: build warning after merge of the rtc tree Heiner Kallweit <hkallweit1@gmail.com> - 2017-07-06 08:00 +0200
Re: linux-next: build warning after merge of the rtc tree Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-07-06 09:00 +0200
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2017-07-06 06:30 +0200 |
| Subject | linux-next: build warning after merge of the rtc tree |
| Message-ID | <u06Ap-7Hd-1@gated-at.bofh.it> |
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")
--
Cheers,
Stephen Rothwell
[toc] | [next] | [standalone]
| From | Heiner Kallweit <hkallweit1@gmail.com> |
|---|---|
| Date | 2017-07-06 08:00 +0200 |
| Message-ID | <u07Zv-i3-3@gated-at.bofh.it> |
| In reply to | #1682038 |
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
[toc] | [prev] | [next] | [standalone]
| From | Alexandre Belloni <alexandre.belloni@free-electrons.com> |
|---|---|
| Date | 2017-07-06 09:00 +0200 |
| Message-ID | <u08VA-Sf-23@gated-at.bofh.it> |
| In reply to | #1682059 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web