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

Re: Xen Coding style and clang-format


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: George Dunlap <George.Dunlap@xxxxxxxxxx>
  • Date: Wed, 30 Sep 2020 10:24:02 +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=7RvsSyi7CugpAWDdul/RBNpyUr8qYrNbdJatwSLM4hQ=; b=CnbTpHmfP0pQdaRlLnSiqTIMFa4EpxFgE9/pHClfDBhC5ya4y+18qh1gZB7wnkujs92DCIN97Ka2wljWTkE9KRoZqnkkPXtV4h8lM0PIb1TRdC2+Jb46IXsRd99XuBHG9naI26p1ySV62Zs9KrJvlzGPSs1vQTy+1BXZeV2axm9ZL7sZfRIq0gvHMh2aoj9sqzTAMeq5I3VWSOZUDSMSEBtN1I9uV9lEvXilduVpm12+ve6O85dI57ouW527xEAslpB5hb00RkZ05GaZpUP1bLPY+kkM9ycE85tAlfPQ+hsRE+CzqKFH3DkcF4d28Bv6lJ77uqSz1sLjVLwqXRz+YA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l95s4RclapUq88RElPUj5eoZJDksmzu4grwF8UADGgHtG7aLe9GhUm4WOAavx0f34pJ2AFWkLzOYrRNHlFoEbMj9KB9D7Vt5j4k5zGUcBXsssT6Dgf3mlFVT/3YTwD/Es3IJEGR9QquXutrOVzArsiA6bytRbU/gsgSaNa/jEWSM5+9Is14HV4W4N80gda8G6dC8WGdssrQMZYw64WLdohZrKSgOE92Yitdjcg/lRAMgXDGozYZ6zLBdoiwbXzTqWlawe30YLm/o4HUDQ4EGoVyjuJUUPU46v4qPevFNpLudw1SnEGw2i+T6aijZ1PXk5y3lSkAzFl59GZMeTmAKYQ==
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Anastasiia Lukianenko <Anastasiia_Lukianenko@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Artem Mygaiev" <Artem_Mygaiev@xxxxxxxx>, "committers@xxxxxxxxxxxxxx" <committers@xxxxxxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "vicooodin@xxxxxxxxx" <vicooodin@xxxxxxxxx>, "viktor.mitin.19@xxxxxxxxx" <viktor.mitin.19@xxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Wed, 30 Sep 2020 10:24:15 +0000
  • Ironport-sdr: SO+Hj/gcyShDo9ZmT7HMMAFGbVSH61c+z57vDSQZc0UUlqvQqQaqmYBmmOwBCKdyh5bTijmazW dJesaymQzry3sFRVKnXdfMrtQLLCEePAj/kHcQ2APzz18rNwVgtHluTZAXBCOq8y024VSldSDu po398JaIW06Q31aqK9ja8zJ9sVke58hkjzhv25H0JoXMBtqMth2hE0n1QYT1nSmiBAwpHHVgG8 FwG8RHTm4E++T1hafc7Rh9YYFuX2kRTskRs3tCvdp9NYpc4O0NsebgUtVYOjGdUiJZ2XSVkJPh FDQ=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHWlwq4nKYEhMN38U+xmvwRsutq+amA8joAgAAHUgA=
  • Thread-topic: Xen Coding style and clang-format


> 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).

 -George

 


Rackspace

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