linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86: mce: add notifier_block forward declaration
@ 2018-08-17 10:01 Arnd Bergmann
  2018-08-20 16:10 ` [tip:x86/urgent] x86/mce: Add " tip-bot for Arnd Bergmann
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2018-08-17 10:01 UTC (permalink / raw)
  To: x86
  Cc: Nicolai Stange, Arnd Bergmann, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, Greg Kroah-Hartman, linux-kernel

Without linux/irq.h, we don't see a declaration of notifier_block,
leading to a build warning:

In file included from arch/x86/kernel/cpu/mcheck/threshold.c:10:
arch/x86/include/asm/mce.h:151:46: error: 'struct notifier_block' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]

It's sufficient to declare the struct tag here, which avoids pulling
in more header files.

Fixes: 447ae3166702 ("x86: Don't include linux/irq.h from asm/hardirq.h")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/x86/include/asm/mce.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index 8c7b3e5a2d01..3a17107594c8 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -148,6 +148,7 @@ enum mce_notifier_prios {
 	MCE_PRIO_LOWEST		= 0,
 };
 
+struct notifier_block;
 extern void mce_register_decode_chain(struct notifier_block *nb);
 extern void mce_unregister_decode_chain(struct notifier_block *nb);
 
-- 
2.18.0


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

* [tip:x86/urgent] x86/mce: Add notifier_block forward declaration
  2018-08-17 10:01 [PATCH] x86: mce: add notifier_block forward declaration Arnd Bergmann
@ 2018-08-20 16:10 ` tip-bot for Arnd Bergmann
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Arnd Bergmann @ 2018-08-20 16:10 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: gregkh, arnd, tglx, hpa, nstange, linux-kernel, bp, mingo

Commit-ID:  704ae091b061082b37a9968621af4c290c641d50
Gitweb:     https://git.kernel.org/tip/704ae091b061082b37a9968621af4c290c641d50
Author:     Arnd Bergmann <arnd@arndb.de>
AuthorDate: Fri, 17 Aug 2018 12:01:36 +0200
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 20 Aug 2018 18:04:42 +0200

x86/mce: Add notifier_block forward declaration

Without linux/irq.h, there is no declaration of notifier_block, leading to
a build warning:

In file included from arch/x86/kernel/cpu/mcheck/threshold.c:10:
arch/x86/include/asm/mce.h:151:46: error: 'struct notifier_block' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]

It's sufficient to declare the struct tag here, which avoids pulling in
more header files.

Fixes: 447ae3166702 ("x86: Don't include linux/irq.h from asm/hardirq.h")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Nicolai Stange <nstange@suse.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20180817100156.3009043-1-arnd@arndb.de

---
 arch/x86/include/asm/mce.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h
index 8c7b3e5a2d01..3a17107594c8 100644
--- a/arch/x86/include/asm/mce.h
+++ b/arch/x86/include/asm/mce.h
@@ -148,6 +148,7 @@ enum mce_notifier_prios {
 	MCE_PRIO_LOWEST		= 0,
 };
 
+struct notifier_block;
 extern void mce_register_decode_chain(struct notifier_block *nb);
 extern void mce_unregister_decode_chain(struct notifier_block *nb);
 

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

end of thread, other threads:[~2018-08-20 16:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-17 10:01 [PATCH] x86: mce: add notifier_block forward declaration Arnd Bergmann
2018-08-20 16:10 ` [tip:x86/urgent] x86/mce: Add " tip-bot for Arnd Bergmann

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).