[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH v2 3/3] drivers/video: make declarations of defined functions available



On 17/08/2023 15:28, Jan Beulich wrote:
On 17.08.2023 14:39, Nicola Vetrini wrote:
--- a/xen/include/xen/vga.h
+++ b/xen/include/xen/vga.h
@@ -15,4 +15,20 @@
 extern struct xen_vga_console_info vga_console_info;
 #endif

+int fill_console_start_info(struct dom0_vga_console_info *);
+
+#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
+
+#ifdef CONFIG_VIDEO
+void vesa_init(void);
+#else
+static inline void vesa_init(void) {};
+#endif

Hmm, on one hand you simply move existing code here. But then why don't
you leverage the existing #ifdef? The more that it's more specific and
in line with drivers/video/Makefile having

obj-$(CONFIG_VGA) := vga.o

and

obj-$(CONFIG_VGA) += vesa.o

Jan

Are you saying that CONFIG_VGA implies CONFIG_VIDEO and therefore "#ifdef CONFIG_VGA" at line 14 of vga.h can be used instead of the #ifdefs inherited from the original locations
to wrap all the declarations that are being moved?

--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.