]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ARM: imx: mark imx53_suspend_sz as unused
authorArnd Bergmann <arnd@arndb.de>
Tue, 25 Feb 2025 20:11:52 +0000 (21:11 +0100)
committerShawn Guo <shawnguo@kernel.org>
Tue, 11 Mar 2025 02:57:51 +0000 (10:57 +0800)
Unused 'static const' variables cause a warning when building with
W=1, and imx53_suspend_sz has a definition for this as an
alternative when CONFIG_SUSPEND is disabled:

    In file included from arch/arm/mach-imx/cpu.c:9:
    arch/arm/mach-imx/common.h:101:18: error: 'imx53_suspend_sz' defined but not used [-Werror=unused-const-variable=]

It's still referenced though, so mark it as __maybe_unused, so
the one user can address the dummy copy and other files that include
the header don't produce a warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/mach-imx/common.h

index 13f3068e98459f727a8298902c37cb66c8e382ef..45c1a2a7b35f95a17923203df21c79a1d8632355 100644 (file)
@@ -98,7 +98,7 @@ extern const u32 imx53_suspend_sz;
 void imx6_suspend(void __iomem *ocram_vbase);
 #else
 static inline void imx53_suspend(void __iomem *ocram_vbase) {}
-static const u32 imx53_suspend_sz;
+static __maybe_unused const u32 imx53_suspend_sz;
 static inline void imx6_suspend(void __iomem *ocram_vbase) {}
 #endif