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

Re: [PATCH v4 1/3] multiboot2: parse vga= option when setting GOP mode


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 7 Jul 2023 12:24:10 +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=OrjzAScu81OJ8Z+g2rhrx2sRQ6XH9ehb3XynSCHFF8I=; b=fsAX4J1JEo/Uv0eQ48EA0AEK3WaIblIokz7zU/qdQ1BaPpturQoVEJw7GuRatORA3n3rsqMkM0jbycrrVh9Cyojk8ONminyaMfssiq96qb/jPBpk7Bo8rjf9IPlxCVjD8Cun3CE1Tt4dzemHsax9WSAouacWvRm0LVaVJODf9rFFP3yRp0ovB5M/8TdilpbkK8r2zCajxvAbg8flU2MFEScCA80T9Bf6LY1AHGm+vzplzymqUpcWABcylDO1N/pz04FlBA+0A9sNnx8yiIWvKruHV0aoltiNGca3joYVaMaxtbtkyNPfFCCcu4jQSSY/eSmbm3g6bITkETuLw+zUFQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nVTiN6H5fNusdwKWpCeNqhZORqeoAvCpUI7eeZtPkQ+OKhs1Rfw9WZ/rxomYf4+UVWMmiUV274A5H8f4YBXNnGj5Gcz5p6Th9xW4VSoTZGCcxt/ldt3TrCyWUoVW43Kvt9mIQbIChPdHQDKEVA+aIonFKeJGGBQQ+LW+FWj6VqdFG50oueEJgnBGA9jU6RTLIZ80pK0pbOdKYdGd7GV6NmtUXA4mviklRWd66gcZ38f/2bKjkT3MFQjLKQIRnX2+QLs0oB17Q9lvfaXRoTYt6Bi6ahrpQQtO+kIGN4yRYZOx0pRcB3OfCSHPvTF2QVicjK2uN0RdKJkiocwai1e0qQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 07 Jul 2023 10:24:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.07.2023 12:13, Roger Pau Monné wrote:
> On Thu, Jul 06, 2023 at 12:41:58PM +0200, Jan Beulich wrote:
>> On 05.07.2023 13:47, Roger Pau Monne wrote:
>>> --- a/xen/arch/x86/efi/efi-boot.h
>>> +++ b/xen/arch/x86/efi/efi-boot.h
>>> @@ -795,7 +795,30 @@ static bool __init 
>>> efi_arch_use_config_file(EFI_SYSTEM_TABLE *SystemTable)
>>>  
>>>  static void __init efi_arch_flush_dcache_area(const void *vaddr, UINTN 
>>> size) { }
>>>  
>>> -void __init efi_multiboot2(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE 
>>> *SystemTable)
>>> +/* Return a pointer to the character after the first occurrence of opt in 
>>> cmd */
>>> +static const char __init *get_option(const char *cmd, const char *opt)
>>
>> Nit: __init and * want to change places.
> 
> Hm, yes.  I assume that placing it before the return type is not OK?
> (static const __init char ...)

That's still in the middle of the return type then. Technically gcc
accepts it being placed anywhere, but they reserve the right to change
meaning when not placed appropriately. Recall that you may alter both
attributes of a function (or variable) and attributes of types. Hence
to disambiguate both, proper placement may become necessary down the
road. And while it might be that

static __init const char *...

would also be okay-ish (albeit I'm not certain), that's still against
how we do things commonly (i.e. a not written down style aspect).

>>>[...]
> 
> LGTM, please adjust if you don't mind, otherwise I can send an
> adjusted version.

No need to send an update.

Jan



 


Rackspace

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