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

Re: [PATCH v4 04/11] xsm: apply coding style


  • To: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 7 Sep 2021 15:50:58 +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; bh=12dn3pQY22t0OvIVVptgaOURbegA5BTrCgl17yzHBvQ=; b=Q2BxwsHdGemQzr/oBDtl+XiBZgjCpiXxAiQ7A6AdWR9ezJTp3tiEpr8I1hgsnyGwNFgRNocsxkOwfDoUOBwWSQr9cbpfgsZjr72kchN672kJ+AYp0abFihKUApkiLRsKpeeP3m/oUxWexZUlfc8kI/OrMxetayPrKxNS0INKy6a1IyyxP94Usl+J1ixVjbopDUXQX2M1e9qnFKXqYrFPijlAzfXRVBmBajWUL4+wHwcvNS6zoBXiJ1tSbQuADf2GwuqiibhbHLntMTKONv78NsDIYKqriITbq9m8ecVs2/Zfdyf4occ2VcNmGESDR3ZmqUczg8U7gzXEB43tqQHz5A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ned0cZd1dBZbzV6j7mc4luj8weeZVsOjB7ioXLV6QW8WAGVNxOa4SXoKB7MYRAVhfZeJIKDiYPIGxYe0OoRUtRoCRlSORf178gxbqgQLqU0zRlozhXsjXem3PEIaAzhBCCfLSkerAenGr1oxE0KpcqODIj5pBqC+fbX+Rv4aTmEf3kq6BBAgz0YWqxb0qzFoB2FYvKqy+99idZ4O677T15CCequP4qSlnmNWvsW6q1aoUsLR8DgYsoUaggEdVxUb8bV0YO6o2N9rJRAmt5abKvzJuNaCEw3SiIvQE+retMTe/UZ17r09o8HCLyq5UEzvJBmgslQDUIObVooQ/4/y5Q==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 07 Sep 2021 13:51:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 07.09.2021 15:41, Daniel P. Smith wrote:
> On 9/6/21 2:17 PM, Andrew Cooper wrote:
>> On 03/09/2021 20:06, Daniel P. Smith wrote:
>>> --- a/xen/include/xsm/dummy.h
>>> +++ b/xen/include/xsm/dummy.h
>>> @@ -69,8 +69,9 @@ void __xsm_action_mismatch_detected(void);
>>>   
>>>   #endif /* CONFIG_XSM */
>>>   
>>> -static always_inline int xsm_default_action(
>>> -    xsm_default_t action, struct domain *src, struct domain *target)
>>> +static always_inline int xsm_default_action(xsm_default_t action,
>>> +                                            struct domain *src,
>>> +                                            struct domain *target)
>>
>> The old code is correct.  We have plenty of examples of this in Xen, and
>> I have been adding new ones when appropriate.
>>
>> It avoids squashing everything on the RHS and ballooning the line count
>> to compensate.  (This isn't a particularly bad example, but we've had
>> worse cases in the past).
> 
> Based on the past discussions I understood either is acceptable and find 
> this version much easier to visually parse myself. With that said, if
> the "next line single indent" really is the preferred style by the 
> maintainers/community, then I can convert all of these over.

I guess neither is the "preferred" style; as Andrew says, both are
acceptable and both are in active use. I guess the rule of thumb is:
The longer what's left of the function name, the more you should
consider the style that you change away from.

Anyway, in the end I guess the request for style adjustments was
mainly to purge bad style, not to convert one acceptable form to
another. Converting the entire file to the same style is of course
fine (for producing a consistent result), but then - as per above -
here it would more likely be the one that in this case was already
there.

Jan




 


Rackspace

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