[Devel] [PATCH RHEL10 COMMIT] redhat: rh_flags: make the !CONFIG_RHEL_DIFFERENCES stubs inline

Konstantin Khorenko khorenko at virtuozzo.com
Fri Aug 21 19:42:28 MSK 2026


The commit is pushed to "branch-rh10-6.12.0-211.39.1.16.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-211.39.1.16.6.vz10
------>
commit 7162d0a644374f25ae0a1b50b477c53fc47c5e4b
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date:   Fri Aug 21 18:37:14 2026 +0200

    redhat: rh_flags: make the !CONFIG_RHEL_DIFFERENCES stubs inline
    
    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 d498d319ace3a..4bb0f5585df0b 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


More information about the Devel mailing list