]> xenbits.xensource.com Git - xen.git/commitdiff
xen: make 'saved_cmdline' static
authorNicola Vetrini <nicola.vetrini@bugseng.com>
Thu, 10 Aug 2023 13:13:21 +0000 (15:13 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 10 Aug 2023 13:13:21 +0000 (15:13 +0200)
The variable 'saved_cmdline' can be defined static,
as its only uses are within the same file. This in turn avoids
violating MISRA C:2012 Rule 8.4 because no declaration is present.

Fixes: e6ee01ad24b6 ("xen/version: Drop compat/kernel.c")
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/common/kernel.c

index fb919f3d9c389ff688c9789aaafe300dc82c0c55..52aa28762782bbdf6e541cfef52478dc44e93adb 100644 (file)
@@ -28,7 +28,7 @@ CHECK_feature_info;
 
 enum system_state system_state = SYS_STATE_early_boot;
 
-xen_commandline_t saved_cmdline;
+static xen_commandline_t saved_cmdline;
 static const char __initconst opt_builtin_cmdline[] = CONFIG_CMDLINE;
 
 static int assign_integer_param(const struct kernel_param *param, uint64_t val)