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

Re: Xen Coding style and clang-format

  • To: Anastasiia Lukianenko <Anastasiia_Lukianenko@xxxxxxxx>
  • From: George Dunlap <George.Dunlap@xxxxxxxxxx>
  • Date: Thu, 1 Oct 2020 10:06:21 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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-SenderADCheck; bh=/UAhn6V5sQFFpeKUVPG2DKvo68iuogAeGXi0cF0ZRLA=; b=XBgxFXEHr+TcOnlw0X9dzC7FF2EVfXpHc8vFzewdmxMp1YOVspx4fHu6xxCcKSEX6xLK/nU4YltzzZreckdVZUYyKDKioEN34T3k9XyIfRleB9z3DR1ZejTDv3GHYNi8piw/7bjh8Cp+YkpLmv3IN/Z19k1CWiPWtaptBJ8yEHKFkzDCGXkqdnh3VFePy6qQmaxy6iSSAN7R1wfaEmCY0muUiNdm0ajIBBJ3HU8w/bqFZvrT22NvmFwu84sTuea/IMON6p1vWh9S6sIDuhjLZiudJN7EHbhJ+sekYRhx3uVYltcd93noqXxKR7yer5y+C6pqQkagHTZI/yqgRN4aVQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B+he/qXg7uS64agHxgf90uckSMUJ8pWMqulNW8mRz5hsydPrEMbx5Sog4N+N6zi4HIZ653YHFqE14VeaXvRRmiC9cGZpXWuLFNf3tCbKWYhjcElrgcfj6ltr4Ra8OClpvSUVKUgmoVv9mdz7kgzmdyqPHeFFaTmpEsm9XaVC/ZwSfzYpOj1BoSUEITGVpRN2idNHirCaw5TOTYPz5TGaPSIVxYzjfIj/1MqVRt4j6Exsua6Umc/SPk2O7pr9Ha9dx9L1t9zAcRoKiP/K7hix2pywCH67juHTjJOwofYJFKmDoMh5RHr52s3l4KAoE5lqjFOP9U6HjS4g71Up6F7p7w==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, Artem Mygaiev <Artem_Mygaiev@xxxxxxxx>, "committers@xxxxxxxxxxxxxx" <committers@xxxxxxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "vicooodin@xxxxxxxxx" <vicooodin@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "viktor.mitin.19@xxxxxxxxx" <viktor.mitin.19@xxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 01 Oct 2020 10:06:34 +0000
  • Ironport-sdr: dH5ekr5PSIQNc0O9zF19lXXz/rnUyuiMVeOkZ6NLI875zIp7BZu82889yqe9LfhMdqn4AkyZwD +7pB5hlWSKNICdJnUKS+LBrs6miVzLG1RXV/CjDnte0WGv7gEzBBBPZULafJURGEiTqZgjTsck oypZfz7sH0TrW49IehhgymszVOWn73dQTio4ipIlCfSy2dDHGnhEGqNtWudyfXBCyq/I+S/WBe 9Wg0aD14nFLGsvhZ/zHUJ/+jyoU8B+kBjkDLgi75IwNiLdOgIL6r4FVVzviS5XxnQ+63kSuKUj YTM=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHWlwq4nKYEhMN38U+xmvwRsutq+amA8joAgAAHUgCAAXyKAIAAENkA
  • Thread-topic: Xen Coding style and clang-format

> On Oct 1, 2020, at 10:06 AM, Anastasiia Lukianenko 
> <Anastasiia_Lukianenko@xxxxxxxx> wrote:
> Hi,
> On Wed, 2020-09-30 at 10:24 +0000, George Dunlap wrote:
>>> On Sep 30, 2020, at 10:57 AM, Jan Beulich <jbeulich@xxxxxxxx>
>>> wrote:
>>> On 30.09.2020 11:18, Anastasiia Lukianenko wrote:
>>>> I would like to know your opinion on the following coding style
>>>> cases.
>>>> Which option do you think is correct?
>>>> 1) Function prototype when the string length is longer than the
>>>> allowed
>>>> one
>>>> -static int __init
>>>> -acpi_parse_gic_cpu_interface(struct acpi_subtable_header
>>>> *header,
>>>> -                             const unsigned long end)
>>>> +static int __init acpi_parse_gic_cpu_interface(
>>>> +    struct acpi_subtable_header *header, const unsigned long
>>>> end)
>>> Both variants are deemed valid style, I think (same also goes for
>>> function calls with this same problem). In fact you mix two
>>> different style aspects together (placement of parameter
>>> declarations and placement of return type etc) - for each
>>> individually both forms are deemed acceptable, I think.
>> If we’re going to have a tool go through and report (correct?) all
>> these coding style things, it’s an opportunity to think if we want to
>> add new coding style requirements (or change existing requirements).
> I am ready to discuss new requirements and implement them in rules of
> the Xen Coding style checker.

Thank you. :-)  But what I meant was: Right now we don’t require one approach 
or the other for this specific instance.  Do we want to choose one?

I think in this case it makes sense to do the easiest thing.  If it’s easy to 
make the current tool accept both styles, let’s just do that for now.  If the 
tool currently forces you to choose one of the two styles, let’s choose one.




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