From: Guenter Roeck Date: Thu, 13 Mar 2025 11:43:27 +0000 (+0000) Subject: sh: move defines needed for suppressing warning backtraces X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=e0984ec49b8f81c6c74fa572d76b3842f8cfa52f;p=users%2Fwilly%2Fpagecache.git sh: move defines needed for suppressing warning backtraces Declaring the defines needed for suppressing warning inside '#ifdef CONFIG_DEBUG_BUGVERBOSE' results in a kerneldoc warning. .../bug.h:29: warning: expecting prototype for _EMIT_BUG_ENTRY(). Prototype was for HAVE_BUG_FUNCTION() instead Move the defines above the kerneldoc entry for _EMIT_BUG_ENTRY to make kerneldoc happy. Link: https://lkml.kernel.org/r/20250313114329.284104-13-acarmina@redhat.com Signed-off-by: Guenter Roeck Signed-off-by: Alessandro Carminati Reported-by: Simon Horman Cc: Simon Horman Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: Albert Ou Cc: Alexander Gordeev Cc: Arnd Bergmann Cc: Arthur Grillo Cc: Borislav Petkov Cc: Brendan Higgins Cc: Catalin Marinas Cc: Charlie Jenkins Cc: Dan Carpenter Cc: Daniel Diaz Cc: Daniel Vetter Cc: Dave Airlie Cc: Dave Hansen Cc: David Gow Cc: Heiko Carstens Cc: Helge Deller Cc: Huacai Chen Cc: Ingo Molnar Cc: Jani Nikula Cc: Kees Cook Cc: Linux Kernel Functional Testing Cc: Maarten Lankhorst Cc: MaĆ­ra Canal Cc: Maxime Ripard Cc: Michael Ellerman Cc: Naresh Kamboju Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Rae Moar Cc: Thomas Gleixner Cc: Thomas Zimemrmann Cc: Vasily Gorbik Cc: Ville Syrjala Cc: Will Deacon Signed-off-by: Andrew Morton --- diff --git a/arch/sh/include/asm/bug.h b/arch/sh/include/asm/bug.h index 470ce6567d209..bf4947d51d693 100644 --- a/arch/sh/include/asm/bug.h +++ b/arch/sh/include/asm/bug.h @@ -11,6 +11,15 @@ #define HAVE_ARCH_BUG #define HAVE_ARCH_WARN_ON +#ifdef CONFIG_DEBUG_BUGVERBOSE +#ifdef CONFIG_KUNIT_SUPPRESS_BACKTRACE +# define HAVE_BUG_FUNCTION +# define __BUG_FUNC_PTR "\t.long %O2\n" +#else +# define __BUG_FUNC_PTR +#endif /* CONFIG_KUNIT_SUPPRESS_BACKTRACE */ +#endif /* CONFIG_DEBUG_BUGVERBOSE */ + /** * _EMIT_BUG_ENTRY * %1 - __FILE__ @@ -25,13 +34,6 @@ */ #ifdef CONFIG_DEBUG_BUGVERBOSE -#ifdef CONFIG_KUNIT_SUPPRESS_BACKTRACE -# define HAVE_BUG_FUNCTION -# define __BUG_FUNC_PTR "\t.long %O2\n" -#else -# define __BUG_FUNC_PTR -#endif /* CONFIG_KUNIT_SUPPRESS_BACKTRACE */ - #define _EMIT_BUG_ENTRY \ "\t.pushsection __bug_table,\"aw\"\n" \ "2:\t.long 1b, %O1\n" \