public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sparc32: remove stale RTC_PORT definition
@ 2016-06-04  9:36 Arnd Bergmann
  2016-06-04 10:52 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2016-06-04  9:36 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: linux-kernel, Jiri Kosina, rtc-linux, Arnd Bergmann,
	David S. Miller, sparclinux

sparc32:allmodconfig fails to build in next-20160602 as follows.

In file included from drivers/block/floppy.c:185:0:
include/linux/mc146818rtc.h: In function 'mc146818_is_updating':
include/linux/mc146818rtc.h:138:9: error: 'rtc_port' undeclared (first use in this function)
include/linux/mc146818rtc.h:138:9: note: each undeclared identifier is reported only once for each function it appears in
include/linux/mc146818rtc.h: In function 'mc146818_get_time':
include/linux/mc146818rtc.h:172:17: error: 'rtc_port' undeclared (first use in this function)
include/linux/mc146818rtc.h: In function 'mc146818_set_time':
include/linux/mc146818rtc.h:278:8: error: 'rtc_port' undeclared (first use in this function)
scripts/Makefile.build:295: recipe for target 'drivers/block/floppy.o' failed

The reason is a duplicate definition of the RTC_PORT macro. The
one in arch/sparc/include/asm/io_32.h was apparently used a long time
ago for the drivers/char/rtc.c driver that is not available on SPARC
any more, since we now select 'RTC_CLASS' unconditionally.

Removing the macro fixes the build problem, and for consistency,
this also removes the RTC_ALWAYS_BCD macro and the comment for both.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Fixes: fd09cc80165c ("rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h")
---
I thought I'd sent this out yesterday, but cannot find an indication of
that now, and Alexandre didn't seem to get it. This should probably
go through the rtc tree that introduced the build failure after my
earlier patches

 arch/sparc/include/asm/io_32.h | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/arch/sparc/include/asm/io_32.h b/arch/sparc/include/asm/io_32.h
index 57f26c398dc9..4dd268a3a8b0 100644
--- a/arch/sparc/include/asm/io_32.h
+++ b/arch/sparc/include/asm/io_32.h
@@ -140,16 +140,6 @@ void ioport_unmap(void __iomem *);
 struct pci_dev;
 void pci_iounmap(struct pci_dev *dev, void __iomem *);
 
-
-
-/*
- * At the moment, we do not use CMOS_READ anywhere outside of rtc.c,
- * so rtc_port is static in it. This should not change unless a new
- * hardware pops up.
- */
-#define RTC_PORT(x)   (rtc_port + (x))
-#define RTC_ALWAYS_BCD  0
-
 static inline int sbus_can_dma_64bit(void)
 {
 	return 0; /* actually, sparc_cpu_model==sun4d */
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] sparc32: remove stale RTC_PORT definition
  2016-06-04  9:36 [PATCH] sparc32: remove stale RTC_PORT definition Arnd Bergmann
@ 2016-06-04 10:52 ` Alexandre Belloni
  0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2016-06-04 10:52 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-kernel, Jiri Kosina, rtc-linux, David S. Miller, sparclinux

On 04/06/2016 at 11:36:44 +0200, Arnd Bergmann wrote :
> sparc32:allmodconfig fails to build in next-20160602 as follows.
> 
> In file included from drivers/block/floppy.c:185:0:
> include/linux/mc146818rtc.h: In function 'mc146818_is_updating':
> include/linux/mc146818rtc.h:138:9: error: 'rtc_port' undeclared (first use in this function)
> include/linux/mc146818rtc.h:138:9: note: each undeclared identifier is reported only once for each function it appears in
> include/linux/mc146818rtc.h: In function 'mc146818_get_time':
> include/linux/mc146818rtc.h:172:17: error: 'rtc_port' undeclared (first use in this function)
> include/linux/mc146818rtc.h: In function 'mc146818_set_time':
> include/linux/mc146818rtc.h:278:8: error: 'rtc_port' undeclared (first use in this function)
> scripts/Makefile.build:295: recipe for target 'drivers/block/floppy.o' failed
> 
> The reason is a duplicate definition of the RTC_PORT macro. The
> one in arch/sparc/include/asm/io_32.h was apparently used a long time
> ago for the drivers/char/rtc.c driver that is not available on SPARC
> any more, since we now select 'RTC_CLASS' unconditionally.
> 
> Removing the macro fixes the build problem, and for consistency,
> this also removes the RTC_ALWAYS_BCD macro and the comment for both.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Fixes: fd09cc80165c ("rtc: cmos: move mc146818rtc code out of asm-generic/rtc.h")
> ---
> I thought I'd sent this out yesterday, but cannot find an indication of
> that now, and Alexandre didn't seem to get it. This should probably
> go through the rtc tree that introduced the build failure after my
> earlier patches
> 
>  arch/sparc/include/asm/io_32.h | 10 ----------
>  1 file changed, 10 deletions(-)
> 
Applied, thanks.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-04 10:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-04  9:36 [PATCH] sparc32: remove stale RTC_PORT definition Arnd Bergmann
2016-06-04 10:52 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox