Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1346578 > unrolled thread

[PATCH] rtc: rtc-generic: use correct header file

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2016-03-01 13:50 +0100
Last post2016-03-01 14:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] rtc: rtc-generic: use correct header file Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-03-01 13:50 +0100
    Re: [PATCH] rtc: rtc-generic: use correct header file Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-03-01 14:10 +0100

#1346578 — [PATCH] rtc: rtc-generic: use correct header file

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2016-03-01 13:50 +0100
Subject[PATCH] rtc: rtc-generic: use correct header file
Message-ID<r7RUt-LY-1@gated-at.bofh.it>
The allmodconfig build of m32r fails with errors like:

In file included from drivers/rtc/rtc-generic.c:12:0:
arch/m32r/include/asm/rtc.h:46:8: error: redefinition of 'struct rtc_time'

drivers/rtc/rtc-generic.c: In function 'generic_get_time':
drivers/rtc/rtc-generic.c:16:21: error: implicit declaration of function 'get_rtc_time'

drivers/rtc/rtc-generic.c:18:12: error: 'RTC_BATT_BAD' undeclared

drivers/rtc/rtc-generic.c: In function 'generic_set_time':
drivers/rtc/rtc-generic.c:26:6: error: implicit declaration of function 'set_rtc_time'

Apart from m32r, many other arch like xtensa, sparc are failing with:
drivers/rtc/rtc-generic.c:12:21: fatal error: asm/rtc.h: No such file or directory

Other rtc drivers are using asm-generic/rtc.h, so use it here.

Fixes: 2a32c792f1c9 ("rtc: enable COMPILE_TEST")
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---

m32r allmodconfig build log is at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/112780210

failure with sparc and xtensa needs more work as after this patch also
they fail with error about missing file "mc146818rtc.h".

 drivers/rtc/rtc-generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-generic.c b/drivers/rtc/rtc-generic.c
index e782ebd..494dd85 100644
--- a/drivers/rtc/rtc-generic.c
+++ b/drivers/rtc/rtc-generic.c
@@ -9,7 +9,7 @@
 #include <linux/platform_device.h>
 #include <linux/rtc.h>
 
-#include <asm/rtc.h>
+#include <asm-generic/rtc.h>
 
 static int generic_get_time(struct device *dev, struct rtc_time *tm)
 {
-- 
1.9.1

[toc] | [next] | [standalone]


#1346600

FromAlexandre Belloni <alexandre.belloni@free-electrons.com>
Date2016-03-01 14:10 +0100
Message-ID<r7SdQ-18V-15@gated-at.bofh.it>
In reply to#1346578
On 01/03/2016 at 18:16:40 +0530, Sudip Mukherjee wrote :
> The allmodconfig build of m32r fails with errors like:
> 
> In file included from drivers/rtc/rtc-generic.c:12:0:
> arch/m32r/include/asm/rtc.h:46:8: error: redefinition of 'struct rtc_time'
> 
> drivers/rtc/rtc-generic.c: In function 'generic_get_time':
> drivers/rtc/rtc-generic.c:16:21: error: implicit declaration of function 'get_rtc_time'
> 
> drivers/rtc/rtc-generic.c:18:12: error: 'RTC_BATT_BAD' undeclared
> 
> drivers/rtc/rtc-generic.c: In function 'generic_set_time':
> drivers/rtc/rtc-generic.c:26:6: error: implicit declaration of function 'set_rtc_time'
> 
> Apart from m32r, many other arch like xtensa, sparc are failing with:
> drivers/rtc/rtc-generic.c:12:21: fatal error: asm/rtc.h: No such file or directory
> 
> Other rtc drivers are using asm-generic/rtc.h, so use it here.
> 
> Fixes: 2a32c792f1c9 ("rtc: enable COMPILE_TEST")
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> ---
> 
> m32r allmodconfig build log is at:
> https://travis-ci.org/sudipm-mukherjee/parport/jobs/112780210
> 
> failure with sparc and xtensa needs more work as after this patch also
> they fail with error about missing file "mc146818rtc.h".
> 

Yeah I'll remove COMPILE_TEST for that driver.


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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web