Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7A9C8C3062E for ; Thu, 17 Aug 2023 14:52:44 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.585463.916594 (Exim 4.92) (envelope-from ) id 1qWeME-00051x-Oy; Thu, 17 Aug 2023 14:52:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 585463.916594; Thu, 17 Aug 2023 14:52:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qWeME-00051q-MQ; Thu, 17 Aug 2023 14:52:18 +0000 Received: by outflank-mailman (input) for mailman id 585463; Thu, 17 Aug 2023 14:52:17 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qWeMD-00051k-EV for xen-devel@lists.xenproject.org; Thu, 17 Aug 2023 14:52:17 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id a7360802-3d0d-11ee-9b0c-b553b5be7939; Thu, 17 Aug 2023 16:52:14 +0200 (CEST) Received: from support.bugseng.com (support.bugseng.com [162.55.131.47]) by support.bugseng.com (Postfix) with ESMTPA id 2FA894EE0737; Thu, 17 Aug 2023 16:52:14 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a7360802-3d0d-11ee-9b0c-b553b5be7939 MIME-Version: 1.0 Date: Thu, 17 Aug 2023 16:52:14 +0200 From: Nicola Vetrini To: Jan Beulich Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Andrew Cooper , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Wei Liu , George Dunlap , Julien Grall , xen-devel@lists.xenproject.org Subject: Re: [XEN PATCH v2 3/3] drivers/video: make declarations of defined functions available In-Reply-To: <111382a3-0845-99b5-1efa-dfc505084c66@suse.com> References: <111382a3-0845-99b5-1efa-dfc505084c66@suse.com> User-Agent: Roundcube Webmail/1.4.3 Message-ID: X-Sender: nicola.vetrini@bugseng.com Organization: BUGSENG s.r.l. Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit 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)