All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "Daniel P. Smith" <dpsmith@apertussolutions.com>
Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>, xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 09/10] xsm: expand the function related macros in dummy.h
Date: Tue, 3 Aug 2021 09:23:07 +0200	[thread overview]
Message-ID: <75b2e3a8-4e6e-c73e-9e35-8f1c9f501b9d@suse.com> (raw)
In-Reply-To: <0c944d5f-cc79-4df9-9531-cb918aef8fe8@apertussolutions.com>

On 24.07.2021 22:07, Daniel P. Smith wrote:
> On 7/16/21 3:34 AM, Jan Beulich wrote:
>> On 12.07.2021 22:32, Daniel P. Smith wrote:
>>> With the elimination of switching how dummy.h gets included, the function
>>> declaration macros are no longer necessary. This commit expands them out to the
>>> only value for which they will ever be set. This results in function
>>> declaration lengths changing and since some definitions did not even follow the
>>> 80 column wrapping style, all function definitions were aligned with the
>>> predominate style found in core hypervisor code.
>>
>> I'm afraid this last half sentence is quite far from true:
> 
> I would disagree since I know I went through the frustration of trying
> to find a discernible consistency in the files in common/ in the end I
> settled on following common/memory.c since it seemed to have the most
> uniform, it had only a couple of anomalies, as opposed to other files
> where indentation was varied throughout.
> 
>>> @@ -82,43 +79,43 @@ static always_inline int xsm_default_action(
>>>      }
>>>  }
>>>  
>>> -static XSM_INLINE void dummy_security_domaininfo(struct domain *d,
>>> +static inline void dummy_security_domaininfo(struct domain *d,
>>>                                      struct xen_domctl_getdomaininfo *info)
>>
>> Padding wasn't good here before, but you clearly do not change it to
>> either of the forms we agreed on as being the goal for consistency:
> 
> Then that agreement should be document as CODING_STYLE only states:
> 
> 
> Line Length
> -----------
> 
> Lines should be less than 80 characters in length.  Long lines should
> be split at sensible places and the trailing portions indented.
> 
> 
> I found that in common/memory.c the predominate style was to align
> parameters with the first parameter when wrapping, which is what I
> followed. In this specific case when I wrapped the second parameter to
> make the line less than 80 chars (an explicit rule in CODING_STYLE) and
> attempted to align with the first paramter resulted in the line
> exceeding 80 chars. Since the only hard rule is lines must be less than
> 80, I decreased the indent by enough characters for the line to be less
> than 80 to be in line with CODING_STYLE since it only calls for sensible
> splits that are indented.
> 
>> static inline void dummy_security_domaininfo(struct domain *d,
>>                                              struct xen_domctl_getdomaininfo *info)
>>
>> or
>>
>> static inline void dummy_security_domaininfo(
>>     struct domain *d,
>>     struct xen_domctl_getdomaininfo *info)
>>
> 
> I will align to the second, even though I find it annoying to switch
> alignment styles, since the first would be in violation of CODING_STYLE
> sine the second line would exceed 80 chars

I guess you nevertheless realize that this 2nd form is precisely to
overcome the problem with otherwise exceeding the 80 chars limit,
while at the same time making sure the indentation doesn't end up
entirely random then?

As to extending ./CODING_STYLE - I've had rather bad experience
with attempts to do so, with my two most recent patches to that effect
just having had their 2nd anniversary without getting any feedback
moving things forward (despite, unlike in some earlier instances, the
proposed changes not looking overly controversial to me).

Coincidence or not, just a few days after my submission Volodymyr
submitted a patch making an attempt to document function parameter
indentation [1]. While the patch as is had some comments, it didn't
seem like it was controversial either. Yet nothing has since made it
in.

Jan

[1] https://lists.xen.org/archives/html/xen-devel/2019-07/msg02440.html



  parent reply	other threads:[~2021-08-03  7:23 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12 20:32 [PATCH v2 00/10] xsm: refactoring xsm hooks Daniel P. Smith
2021-07-12 20:32 ` [PATCH v2 01/10] xen: Implement xen/alternative-call.h for use in common code Daniel P. Smith
2021-07-12 23:48   ` Andrew Cooper
2021-07-13  6:28     ` Jan Beulich
2021-07-13  8:36       ` Andrew Cooper
2021-07-13  8:53         ` Jan Beulich
2021-07-14 15:35   ` Jan Beulich
2021-07-12 20:32 ` [PATCH v2 02/10] xsm: refactor xsm_ops handling Daniel P. Smith
2021-07-12 23:39   ` Andrew Cooper
2021-07-14 15:54     ` Jan Beulich
2021-07-15 17:16     ` Daniel P. Smith
2021-07-12 20:32 ` [PATCH v2 03/10] xsm: remove the ability to disable flask Daniel P. Smith
2021-07-12 23:22   ` Andrew Cooper
2021-07-15 17:17     ` Daniel P. Smith
2021-07-14 15:58   ` Jan Beulich
2021-07-15 17:19     ` Daniel P. Smith
2021-07-12 20:32 ` [PATCH v2 04/10] xsm: convert xsm_ops hook calls to alternative call Daniel P. Smith
2021-07-12 23:44   ` Andrew Cooper
2021-07-15 17:20     ` Daniel P. Smith
2021-07-12 20:32 ` [PATCH v2 05/10] xsm: decouple xsm header inclusion selection Daniel P. Smith
2021-07-12 20:32 ` [PATCH v2 06/10] xsm: enable xsm to always be included Daniel P. Smith
2021-07-19 10:24   ` Jan Beulich
2021-07-25 20:47     ` Daniel P. Smith
2021-08-03  7:08       ` Jan Beulich
2021-07-12 20:32 ` [PATCH v2 07/10] xsm: drop generic event channel labeling Daniel P. Smith
2021-07-12 23:52   ` Andrew Cooper
2021-07-15 17:26     ` Daniel P. Smith
2021-07-16  7:03   ` Jan Beulich
2021-07-12 20:32 ` [PATCH v2 08/10] xsm: remove xsm_default_t from hook definitions Daniel P. Smith
2021-07-16  7:23   ` Jan Beulich
2021-07-16 14:15     ` Andrew Cooper
2021-07-16 14:55       ` Jan Beulich
2021-07-16  7:37   ` Jan Beulich
2021-07-27 13:39   ` Ian Jackson
2021-08-06 21:41     ` Daniel P. Smith
2021-08-10  8:39       ` Jan Beulich
2021-08-26  9:42       ` Jan Beulich
2021-07-12 20:32 ` [PATCH v2 09/10] xsm: expand the function related macros in dummy.h Daniel P. Smith
2021-07-16  7:34   ` Jan Beulich
2021-07-24 20:07     ` Daniel P. Smith
2021-07-24 20:43       ` Daniel P. Smith
2021-08-03  7:23       ` Jan Beulich [this message]
2021-07-12 20:32 ` [PATCH v2 10/10] xsm: removing the XSM_ASSERT_ACTION macro Daniel P. Smith
2021-07-12 23:12 ` [PATCH v2 00/10] xsm: refactoring xsm hooks Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=75b2e3a8-4e6e-c73e-9e35-8f1c9f501b9d@suse.com \
    --to=jbeulich@suse.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=dpsmith@apertussolutions.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.