]> Git Repo - linux.git/commitdiff
x86/mce: Add notifier_block forward declaration
authorArnd Bergmann <[email protected]>
Fri, 17 Aug 2018 10:01:36 +0000 (12:01 +0200)
committerThomas Gleixner <[email protected]>
Mon, 20 Aug 2018 16:04:42 +0000 (18:04 +0200)
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 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: Nicolai Stange <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Borislav Petkov <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
arch/x86/include/asm/mce.h

index 8c7b3e5a2d019262eafbb9ccd0514f3278c9255e..3a17107594c88a83f013ecc1123c10d76c6d30c2 100644 (file)
@@ -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);
 
This page took 0.05856 seconds and 4 git commands to generate.