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

Re: Clang-format configuration discussion - pt 2


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Fri, 24 Nov 2023 12:29:10 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=F+imr9Fvw7+ydrW6GcafTxf2V/lPdnwSEjm262AZCEs=; b=WfEA9/wEirrL+PTNGdP1zhF5/lwIR9uKbvzEqDLgqBeVUvNgQ86kl/piV2RJrmW47iRulLbstghPh7MOp8pWWjLk3R0JDcM7Yk+f8oLiZIRzOz/rtFKnFhPxYl8YysM64Y6Vrgq/mNuIZmatCIWoKzQW1bCPpeEfXf4ZBqFFRxGbADxvkuEpEeuQBxVqCQ7o1z5fDOERwEcfacMkNMM0alzxMzSNEuWM+MoOKcG5bKLiyWiCMGPY6rZFbGrOka8oSSTLDCki7AkjgOGqBEgFpBVNoHZge871D0IKlSAlL+FIs9d8cqou9KMjRGLgWuUX6TyY8kQH3UuPJtyn7BRzTg==
  • 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=F+imr9Fvw7+ydrW6GcafTxf2V/lPdnwSEjm262AZCEs=; b=SKUj8t+Dh57/G4Pd9jlKSp/qo5J3tUffceNPGZpWFKWg4iA2F3leJKEL4tY53JHp/SXKy3LjUcsVgv6jXMLDh8Y1M/FwaXKUjckcA/Ma5v/+GCw0BdFY5IYj1Xv2Rdr2t0NwHEylE7+4am1V0eXjNnkXOydJFpxKLEg84o+AiuDUCZI3AjjrKguA8WfBYjyKyPMlsXrWT3fXjPswEqBZiCKmyhLrXZSEbnHRmocgYmU0qGPnQuERgsZAQzD6jPW6T7IbKQiY+zh+S8mQieP6R7Y3AALFyVEqLc2vZJNd56UWyn421KqwyCSYdiPbCSbOG2mOKb3L/5C90MANfKWqpw==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Eb+t+SGoOGhzAHqQuIRUkpLh48n9SotXpKZkeS+Nu1B2j6WgukwZ4sxZWl+OwHV91QKe+saosqtHQQ/w0E1CnBhYnFZRyI8TO3JvAq5TeDlYjvDgrAHWXjVTFs5SWy+mnUEqsiphGmoGRqE+dZgZnzT1CbNyx3tATREjF3jvnwiutqYVkR0NBJAY7EpgIYzzI12mWLgVoG3PKGsUZE/cEnBqJ8uzh0CZEtBQH+MJlK6Wr+gC1Q/uxShI4o+rUI9Rj0jZ0RXjQNAsgJ1iz/ZSzo3qOgL+hYG9O9dBuE/2Jg0/3LVkKzHiYLdNfW2zDwazOBHQE6Y24UrxQ//oJAUHOg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YrrNGjCZrNSyXNoOIjXxgQBkLWNzYM+Nivsi3Js1a9v1rjcZy2kGtpIkwV5IcBCAH6ta9VsKEILEMR3Arpc2dC8Y3uJCYLlcwegVFbYd2PCqqE5tZfjTt9G2kPyuM8dFHqz1hT3mMZVFlJsVRdUMHogjq76ZCz7LKZGw5ZpVHDwip7Wmo+ZfsBhR/9yWKQG2gE84yDbYevrmW0fwj9nZJwm3qSPV2Qv/xs/gouWnDECgoRUv/HTjAOq7fDOCHUWXhQpSzDIvStuL7o9WO8EzzeuyYZiIE3Hz3T1WLAu9OQHZYr/XtPwicaPhxsgpJE1EFAHdkXykGsMa7Xbj3TRwMw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <Michal.Orzel@xxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxx>
  • Delivery-date: Fri, 24 Nov 2023 12:30:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHaHhwDfni7SbjBtk6S7YLD/w4HebCJUeoAgAANCgCAAAc3gIAAATaA
  • Thread-topic: Clang-format configuration discussion - pt 2


> On 24 Nov 2023, at 12:24, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 24.11.2023 12:59, Luca Fancellu wrote:
>> @@ -3333,19 +3318,18 @@ static int __init alloc_domain_evtchn(struct 
>> dt_device_node *node)
>> rc = evtchn_alloc_unbound(&alloc_unbound, domU1_port);
>> if ( rc < 0 )
>> {
>> - printk(XENLOG_ERR
>> - "evtchn_alloc_unbound() failure (Error %d) \n", rc);
>> + printk(XENLOG_ERR "evtchn_alloc_unbound() failure (Error %d) \n", rc);
>> return rc;
>> }
>> - bind_interdomain.remote_dom = d1->domain_id;
>> + bind_interdomain.remote_dom = d1->domain_id;
>> bind_interdomain.remote_port = domU1_port;
>> rc = evtchn_bind_interdomain(&bind_interdomain, d2, domU2_port);
>> if ( rc < 0 )
>> {
>> 
>> Assignment of bind_interdomain.remote_dom was aligned with the following 
>> line, but since the value
>> of this configurable is “None”, clang-format is modifying that to use only 
>> one space before the assignment
>> operator.
> 
> Neither here nor ...
> 
>> One example related to macros can be found on line 1663:
>> 
>> diff --git a/xen/arch/arm/arm32/insn.c b/xen/arch/arm/arm32/insn.c
>> index 49953a042a..1635c4b6d1 100644
>> --- a/xen/arch/arm/arm32/insn.c
>> +++ b/xen/arch/arm/arm32/insn.c
>> @@ -19,9 +19,9 @@
>> #include <asm/insn.h>
>> /* Mask of branch instructions' immediate. */
>> -#define BRANCH_INSN_IMM_MASK GENMASK(23, 0)
>> +#define BRANCH_INSN_IMM_MASK GENMASK(23, 0)
>> /* Shift of branch instructions' immediate. */
>> -#define BRANCH_INSN_IMM_SHIFT 0
>> +#define BRANCH_INSN_IMM_SHIFT 0
>> 
>> Clang format sees the comment between BRANCH_INSN_IMM_MASK and 
>> BRANCH_INSN_IMM_SHIFT and
>> even if before the value of the macros were aligned, it applies the rule of 
>> one space between the macro name
>> and the value.
> 
> ... here there is any change in the formatting on the lines in question.
> I was first suspecting a possible issue with my mail UI, but
> https://lists.xen.org/archives/html/xen-devel/2023-11/msg02132.html
> looks to confirm the issue to more likely be on your end (apparently also
> resulting in leading whitespace having been dropped).

Yes indeed, it seems that copy paste removed the original formatting,
but these snippets can be checked in the patch file I linked, I’ve added
a line number.
Sorry for the inconvenience.

Cheers,
Luca


 


Rackspace

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