]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
drivers/video: make declarations of defined functions available
authorNicola Vetrini <nicola.vetrini@bugseng.com>
Tue, 26 Sep 2023 08:06:18 +0000 (10:06 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 26 Sep 2023 08:06:18 +0000 (10:06 +0200)
The declarations for 'vesa_{init,early_init,endboot}' needed by
'xen/drivers/video/vesa.c' and 'fill_console_start_info' in 'vga.c'
are now available by moving the relative code inside 'vga.h'.

While moving the code, the alternative definitions are now guarded by
CONFIG_VGA. The alternative #define-s for 'vesa_early_init' and 'vesa_endboot'
are dropped, since currently they have no callers when CONFIG_VGA is not defined.

This also resolves violations of MISRA C:2012 Rule 8.4.

Fixes: 6d9199bd0f22 ("x86-64: enable hypervisor output on VESA frame buffer")
Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
xen/arch/x86/include/asm/setup.h
xen/arch/x86/platform_hypercall.c
xen/arch/x86/pv/dom0_build.c
xen/drivers/video/vga.c
xen/include/xen/console.h
xen/include/xen/vga.h

index b0e6a39e236503704cde455afc320f1290beeaa9..dfdd9e555149aa9b60487acd66db82d01e52f71c 100644 (file)
@@ -25,12 +25,6 @@ void subarch_init_memory(void);
 
 void init_IRQ(void);
 
-#ifdef CONFIG_VIDEO
-void vesa_init(void);
-#else
-static inline void vesa_init(void) {};
-#endif
-
 int construct_dom0(
     struct domain *d,
     const module_t *image, unsigned long image_headroom,
index 9ff2da8fc32460101246ddd5ffe10abe21f989ba..9469de9045c797037f418ee6ec8d7faa16bf4fcc 100644 (file)
@@ -14,7 +14,6 @@
 #include <xen/event.h>
 #include <xen/domain_page.h>
 #include <xen/trace.h>
-#include <xen/console.h>
 #include <xen/iocap.h>
 #include <xen/guest_access.h>
 #include <xen/hypercall.h>
@@ -24,6 +23,7 @@
 #include <xen/pmstat.h>
 #include <xen/irq.h>
 #include <xen/symbols.h>
+#include <xen/vga.h>
 #include <asm/current.h>
 #include <public/platform.h>
 #include <acpi/cpufreq/processor_perf.h>
index 909ee9a899a4b7532b914762e77c8d005cc46b95..5bbed3a36a214eaa5e8deb268c9af2e009e4fa12 100644 (file)
@@ -4,7 +4,6 @@
  * Copyright (c) 2002-2005, K A Fraser
  */
 
-#include <xen/console.h>
 #include <xen/domain.h>
 #include <xen/domain_page.h>
 #include <xen/init.h>
@@ -13,6 +12,7 @@
 #include <xen/pfn.h>
 #include <xen/sched.h>
 #include <xen/softirq.h>
+#include <xen/vga.h>
 
 #include <asm/bzimage.h>
 #include <asm/dom0_build.h>
index 0a03508bee60270ff4d708d44fb9a58f8a7ef303..18b590cdf072b6f78eddc38481de85d1e5ffd6f3 100644 (file)
@@ -54,14 +54,6 @@ string_param("vga", opt_vga);
 static unsigned int columns, lines;
 #define ATTRIBUTE   7
 
-#ifdef CONFIG_X86
-void vesa_early_init(void);
-void vesa_endboot(bool_t keep);
-#else
-#define vesa_early_init() ((void)0)
-#define vesa_endboot(x)   ((void)0)
-#endif
-
 void __init video_init(void)
 {
     char *p;
index 53c56191ba9e336f3f602a1448a50893e9387917..ab5c30c0daf2db2f9d9bade3855959187e062a04 100644 (file)
@@ -20,8 +20,6 @@ void console_init_postirq(void);
 void console_endboot(void);
 int console_has(const char *device);
 
-int fill_console_start_info(struct dom0_vga_console_info *);
-
 unsigned long console_lock_recursive_irqsave(void);
 void console_unlock_recursive_irqrestore(unsigned long flags);
 void console_force_unlock(void);
index f72b63d446b133cae1634679bc50326528d8cbeb..ceb8a527ed121cf26b855fe269de7052906b6c5f 100644 (file)
 
 #ifdef CONFIG_VGA
 extern struct xen_vga_console_info vga_console_info;
+int fill_console_start_info(struct dom0_vga_console_info *ci);
+void vesa_init(void);
+void vesa_early_init(void);
+void vesa_endboot(bool keep);
+#else
+static inline void vesa_init(void) {}
 #endif
 
 #endif /* _XEN_VGA_H */