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

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


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 5 Sep 2023 16:42:49 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9EckAGdbJxM6GXHklp4w84GtqGWjLoFS1T/JUXPQtwI=; b=NpDw9wyqmfMhUikqOZ0PdRVhKi+9YSXxOdH2gRCzqHMszEJEWDRUryP6ydqYGMJS46UGwe/uDWTtYmqQEW18y/f4PEAqoUADG4DlFAJ4jLrlQC4yNGNnPNGsxVv3ynOoLx9f1CPIiM2gXt+P43fmZvkSmpmlWpHAKjp6Ugd/fPKmOTL8/0R+pO22TK9ZgRAVlvcT5cOxg7EiNDEcutcT7mwVC1xk52wW/yorwAlUxMOfh25QChZ94yPz8EjpWbQWWufwF2BPvzvBWwNfxtEM7nCxtP0t7bMnVA9yfHrmJNVSYz0EADKDcINxrloD/e0n3S/Fsh4jVcBlS/kvVQo7MQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O6N40g4BBBXFcFcRzjZY6jErGOI5izg6Reb78to9EPLDeFxhrBnNHNcvDAHLDuwwnqQPlLD+6iEYLesuAfe2DvDFZIRTFySd6fNyum8A95vZWNHxWiC3wejSlc6fayp6x9JYqVmJ7j8f4GLNk38lm/xM3iff3XE+n7BL23qJLw2x0E5QbD5cA4AxjxiANLOV2BLp25yr2uzlLY6CWTNY5D+SkAINqFSSffHmPvMJ9/xe5UKUhtjPnAfDTpgx2knIUIiFxYoqrpnUdunHi4xj7Ll8p8UN5co1luniSvhdZKIIHba9n1nNkK8rROwsUlEk+3RlCKWfeaaIHSmlhGFZCg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: sstabellini@xxxxxxxxxx, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 05 Sep 2023 14:43:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.09.2023 09:02, Nicola Vetrini wrote:
> 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, since it implies all previously used constants.

But such an implication doesn't mean said adjustment is correct. Easiest
would likely be to simply drop that half sentence.

> --- a/xen/include/xen/vga.h
> +++ b/xen/include/xen/vga.h
> @@ -13,6 +13,14 @@
> 
>  #ifdef CONFIG_VGA
>  extern struct xen_vga_console_info vga_console_info;
> +int fill_console_start_info(struct dom0_vga_console_info *);
> +void vesa_init(void);
> +void vesa_early_init(void);
> +void vesa_endboot(bool_t keep);

Nit: Just "bool" please.

> +#else
> +#define vesa_early_init() ((void)0)
> +#define vesa_endboot(x)   ((void)0)
> +static inline void vesa_init(void) {};

So why two #define-s and one inline function? Just because it was that
way originally doesn't mean it needs to stay that way. Then again are
the two #define-s actually needed at all? It looks like they were added
to vga.c just out of precaution, covering the "VGA but no VESA" case.
Now that things are properly moved to headers (and keyed to CONFIG_VGA)
I think we'd better omit those. They can be introduced again when we
gain a VGA/VESA split (and a CONFIG_VESA).

Jan



 


Rackspace

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