[Devel] [PATCH vz10 28/32] redhat: rh_flags: make the !CONFIG_RHEL_DIFFERENCES stubs inline
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Aug 21 19:37:14 MSK 2026
The stubs are declared "static void", not "static inline void", so every
translation unit that includes rh_flags.h without calling them gets two
unused functions. That breaks the build of any kernel that has
CONFIG_RHEL_DIFFERENCES off and CONFIG_WERROR on - x86_64 defconfig,
which we now want to keep building, is one of them:
include/linux/rh_flags.h:32:13: error: 'rh_add_flag' defined but not
used [-Werror=unused-function]
include/linux/rh_flags.h:31:13: error: 'rh_print_flags' defined but not
used [-Werror=unused-function]
Fixes: 5e75024bc506 ("redhat: rh_flags: declare proper static methods when !CONFIG_RHEL_DIFFERENCES")
Feature: fix rh/flags
https://virtuozzo.atlassian.net/browse/VSTOR-134732
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
include/linux/rh_flags.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/rh_flags.h b/include/linux/rh_flags.h
index d498d319ace3..4bb0f5585df0 100644
--- a/include/linux/rh_flags.h
+++ b/include/linux/rh_flags.h
@@ -28,7 +28,7 @@ void rh_print_flags(void);
unlikely(__ret_mark_once); \
})
#else
-static void rh_print_flags(void) { }
-static void rh_add_flag(const char *flag_name) { }
+static inline void rh_print_flags(void) { }
+static inline void rh_add_flag(const char *flag_name) { }
#endif
#endif
--
2.47.1
More information about the Devel
mailing list