* [PATCH] Intel SCU Watchdog: Fix build failure and duplicate include
@ 2011-05-26 9:12 Jesper Juhl
0 siblings, 0 replies; 4+ messages in thread
From: Jesper Juhl @ 2011-05-26 9:12 UTC (permalink / raw)
To: linux-kernel
Cc: linux-watchdog, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
x86, Wim Van Sebroeck, Robert Richter, Donald Johnson
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2952 bytes --]
Trying to build the Intel SCU Watchdog fails for me with gcc 4.6.0 -
$ gcc --version | head -n 1
gcc (GCC) 4.6.0 20110513 (prerelease)
like this :
CC drivers/watchdog/intel_scu_watchdog.o
In file included from drivers/watchdog/intel_scu_watchdog.c:49:0:
/home/jj/src/linux-2.6/arch/x86/include/asm/apb_timer.h: In function ‘apbt_time_init’:
/home/jj/src/linux-2.6/arch/x86/include/asm/apb_timer.h:65:42: warning: ‘return’ with a value, in function returning void [enabled by default]
drivers/watchdog/intel_scu_watchdog.c: In function ‘intel_scu_watchdog_init’:
drivers/watchdog/intel_scu_watchdog.c:468:2: error: implicit declaration of function ‘sfi_get_mtmr’ [-Werror=implicit-function-declaration]
drivers/watchdog/intel_scu_watchdog.c:468:32: warning: assignment makes pointer from integer without a cast [enabled by default]
cc1: some warnings being treated as errors
make[1]: *** [drivers/watchdog/intel_scu_watchdog.o] Error 1
make: *** [drivers/watchdog/intel_scu_watchdog.o] Error 2
Additionally, linux/types.h is needlessly being included twice in
drivers/watchdog/intel_scu_watchdog.c
This patch fixes it all and I can now build the code.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
arch/x86/include/asm/apb_timer.h | 2 +-
drivers/watchdog/intel_scu_watchdog.c | 1 -
drivers/watchdog/intel_scu_watchdog.h | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
Patch has been compile tested only.
diff --git a/arch/x86/include/asm/apb_timer.h b/arch/x86/include/asm/apb_timer.h
index 2fefa50..af60d8a 100644
--- a/arch/x86/include/asm/apb_timer.h
+++ b/arch/x86/include/asm/apb_timer.h
@@ -62,7 +62,7 @@ extern int sfi_mtimer_num;
#else /* CONFIG_APB_TIMER */
static inline unsigned long apbt_quick_calibrate(void) {return 0; }
-static inline void apbt_time_init(void) {return 0; }
+static inline void apbt_time_init(void) { }
#endif
#endif /* ASM_X86_APBT_H */
diff --git a/drivers/watchdog/intel_scu_watchdog.c b/drivers/watchdog/intel_scu_watchdog.c
index 919bdd1..ba43860 100644
--- a/drivers/watchdog/intel_scu_watchdog.c
+++ b/drivers/watchdog/intel_scu_watchdog.c
@@ -42,7 +42,6 @@
#include <linux/sched.h>
#include <linux/signal.h>
#include <linux/sfi.h>
-#include <linux/types.h>
#include <asm/irq.h>
#include <asm/atomic.h>
#include <asm/intel_scu_ipc.h>
diff --git a/drivers/watchdog/intel_scu_watchdog.h b/drivers/watchdog/intel_scu_watchdog.h
index d2b074a..a9ca0d7 100644
--- a/drivers/watchdog/intel_scu_watchdog.h
+++ b/drivers/watchdog/intel_scu_watchdog.h
@@ -62,5 +62,5 @@ struct intel_scu_watchdog_dev {
extern int sfi_mtimer_num;
-/* extern struct sfi_timer_table_entry *sfi_get_mtmr(int hint); */
+extern struct sfi_timer_table_entry *sfi_get_mtmr(int hint);
#endif /* __INTEL_SCU_WATCHDOG_H */
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Intel SCU Watchdog: Fix build failure and duplicate include
2011-06-22 20:34 ` Wim Van Sebroeck
@ 2011-06-22 22:47 ` Alan Cox
0 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2011-06-22 22:47 UTC (permalink / raw)
To: Wim Van Sebroeck; +Cc: Jesper Juhl, Donald Johnson, linux-watchdog
> Can you look at attached patch and see what works best? Either we use
> the X86_MRST dependancy or either we need the INTEL_SCU_IPC && APB_TIMER one.
X86_MRST - its a property of the MID platform devices.
Alan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Intel SCU Watchdog: Fix build failure and duplicate include
2011-06-07 15:17 ` Alan Cox
@ 2011-06-22 20:34 ` Wim Van Sebroeck
2011-06-22 22:47 ` Alan Cox
0 siblings, 1 reply; 4+ messages in thread
From: Wim Van Sebroeck @ 2011-06-22 20:34 UTC (permalink / raw)
To: Jesper Juhl, Alan Cox; +Cc: Wim Van Sebroeck, Donald Johnson, linux-watchdog
Hi Jesper,
> > diff --git a/drivers/watchdog/intel_scu_watchdog.h b/drivers/watchdog/intel_scu_watchdog.h
> > index d2b074a..a9ca0d7 100644
> > --- a/drivers/watchdog/intel_scu_watchdog.h
> > +++ b/drivers/watchdog/intel_scu_watchdog.h
> > @@ -62,5 +62,5 @@ struct intel_scu_watchdog_dev {
> >
> > extern int sfi_mtimer_num;
> >
> > -/* extern struct sfi_timer_table_entry *sfi_get_mtmr(int hint); */
> > +extern struct sfi_timer_table_entry *sfi_get_mtmr(int hint);
>
> But this is wrong. It's defined in arch/x86/include/asm/apb_timer.h
>
> Fix I think is too make INTEL_SCU_WATCHDOG also depend on X86_MRST
Can you look at attached patch and see what works best? Either we use
the X86_MRST dependancy or either we need the INTEL_SCU_IPC && APB_TIMER one.
Thanks in advance,
Wim.
diff --git a/arch/x86/include/asm/apb_timer.h b/arch/x86/include/asm/apb_timer.h
index 2fefa50..af60d8a 100644
--- a/arch/x86/include/asm/apb_timer.h
+++ b/arch/x86/include/asm/apb_timer.h
@@ -62,7 +62,7 @@ extern int sfi_mtimer_num;
#else /* CONFIG_APB_TIMER */
static inline unsigned long apbt_quick_calibrate(void) {return 0; }
-static inline void apbt_time_init(void) {return 0; }
+static inline void apbt_time_init(void) { }
#endif
#endif /* ASM_X86_APBT_H */
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 022f9eb..f202707 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -535,8 +535,8 @@ config I6300ESB_WDT
config INTEL_SCU_WATCHDOG
bool "Intel SCU Watchdog for Mobile Platforms"
- depends on WATCHDOG
- depends on INTEL_SCU_IPC
+ depends on X86_MRST
+ depends on INTEL_SCU_IPC && APB_TIMER
---help---
Hardware driver for the watchdog time built into the Intel SCU
for Intel Mobile Platforms.
diff --git a/drivers/watchdog/intel_scu_watchdog.c b/drivers/watchdog/intel_scu_watchdog.c
index 919bdd1..ba43860 100644
--- a/drivers/watchdog/intel_scu_watchdog.c
+++ b/drivers/watchdog/intel_scu_watchdog.c
@@ -42,7 +42,6 @@
#include <linux/sched.h>
#include <linux/signal.h>
#include <linux/sfi.h>
-#include <linux/types.h>
#include <asm/irq.h>
#include <asm/atomic.h>
#include <asm/intel_scu_ipc.h>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Intel SCU Watchdog: Fix build failure and duplicate include
2011-06-07 14:54 Fw: " Wim Van Sebroeck
@ 2011-06-07 15:17 ` Alan Cox
2011-06-22 20:34 ` Wim Van Sebroeck
0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2011-06-07 15:17 UTC (permalink / raw)
To: Wim Van Sebroeck; +Cc: Donald Johnson, linux-watchdog, Jesper Juhl
> diff --git a/arch/x86/include/asm/apb_timer.h b/arch/x86/include/asm/apb_timer.h
> index 2fefa50..af60d8a 100644
> --- a/arch/x86/include/asm/apb_timer.h
> +++ b/arch/x86/include/asm/apb_timer.h
> @@ -62,7 +62,7 @@ extern int sfi_mtimer_num;
> #else /* CONFIG_APB_TIMER */
>
> static inline unsigned long apbt_quick_calibrate(void) {return 0; }
> -static inline void apbt_time_init(void) {return 0; }
> +static inline void apbt_time_init(void) { }
This bit looks right
>
> #endif
> #endif /* ASM_X86_APBT_H */
> diff --git a/drivers/watchdog/intel_scu_watchdog.c b/drivers/watchdog/intel_scu_watchdog.c
> index 919bdd1..ba43860 100644
> --- a/drivers/watchdog/intel_scu_watchdog.c
> +++ b/drivers/watchdog/intel_scu_watchdog.c
> @@ -42,7 +42,6 @@
> #include <linux/sched.h>
> #include <linux/signal.h>
> #include <linux/sfi.h>
> -#include <linux/types.h>
> #include <asm/irq.h>
> #include <asm/atomic.h>
> #include <asm/intel_scu_ipc.h>
Ditto
> diff --git a/drivers/watchdog/intel_scu_watchdog.h b/drivers/watchdog/intel_scu_watchdog.h
> index d2b074a..a9ca0d7 100644
> --- a/drivers/watchdog/intel_scu_watchdog.h
> +++ b/drivers/watchdog/intel_scu_watchdog.h
> @@ -62,5 +62,5 @@ struct intel_scu_watchdog_dev {
>
> extern int sfi_mtimer_num;
>
> -/* extern struct sfi_timer_table_entry *sfi_get_mtmr(int hint); */
> +extern struct sfi_timer_table_entry *sfi_get_mtmr(int hint);
But this is wrong. It's defined in arch/x86/include/asm/apb_timer.h
Fix I think is too make INTEL_SCU_WATCHDOG also depend on X86_MRST
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-22 22:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-26 9:12 [PATCH] Intel SCU Watchdog: Fix build failure and duplicate include Jesper Juhl
2011-06-07 14:54 Fw: " Wim Van Sebroeck
2011-06-07 15:17 ` Alan Cox
2011-06-22 20:34 ` Wim Van Sebroeck
2011-06-22 22:47 ` Alan Cox
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.