From: Wim Van Sebroeck <wim@iguana.be>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Donald Johnson <donald.k.johnson@intel.com>
Cc: linux-watchdog@vger.kernel.org, Jesper Juhl <jj@chaosbits.net>
Subject: Fw: [PATCH] Intel SCU Watchdog: Fix build failure and duplicate include
Date: Tue, 7 Jun 2011 16:54:07 +0200 [thread overview]
Message-ID: <20110607145407.GA12177@infomag.iguana.be> (raw)
Hi Alan, Donald,
Can you look at this?
Thanks in advance,
Wim.
----- Forwarded message from Jesper Juhl <jj@chaosbits.net> -----
Delivery-date: Fri, 27 May 2011 04:42:02 +0200
From: Jesper Juhl <jj@chaosbits.net>
To: linux-kernel@vger.kernel.org
cc: linux-watchdog@vger.kernel.org, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, Wim Van Sebroeck <wim@iguana.be>,
Robert Richter <robert.richter@amd.com>,
Donald Johnson <donald.k.johnson@intel.com>
Subject: [PATCH] Intel SCU Watchdog: Fix build failure and duplicate
include
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.
----- End forwarded message -----
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2011-06-07 14:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-07 14:54 Wim Van Sebroeck [this message]
2011-06-07 15:17 ` [PATCH] Intel SCU Watchdog: Fix build failure and duplicate include Alan Cox
2011-06-22 20:34 ` Wim Van Sebroeck
2011-06-22 22:47 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110607145407.GA12177@infomag.iguana.be \
--to=wim@iguana.be \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=donald.k.johnson@intel.com \
--cc=jj@chaosbits.net \
--cc=linux-watchdog@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).