From: Alejandro Vallejo <alejandro.vallejo@cloud.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
Xen-devel <xen-devel@lists.xenproject.org>,
"Roger Pau Monné" <roger.pau@citrix.com>, "Wei Liu" <wl@xen.org>
Subject: Re: [PATCH] x86/mem: Make mem_hotadd_check() more legible
Date: Wed, 19 Jul 2023 13:54:48 +0100 [thread overview]
Message-ID: <64b7dd19.170a0220.26387.994f@mx.google.com> (raw)
In-Reply-To: <468474ed-60b4-9ff2-83c4-036e1252b99d@suse.com>
On Wed, Jul 19, 2023 at 02:09:55PM +0200, Jan Beulich wrote:
> > [1] The hand-crafted alignment there is going to collide with the efforts
> > to integrate automatic style checkers. It's also not conveying critical
> > information, so I'd argue for its removal in the spirit of making future
> > diffs less intrusive.
>
> ... I don't agree here. First of all I don't see why this should
> make style checking harder. There's nothing written anywhere that
> such alignment padding isn't allowed in our code, so any checker
> we want to use would need to tolerate it. Plus while such padding
> doesn't convey critical information, it still helps readability.
>
> Jan
Considering the last Xen Summit sessions I think it's reasonable to assume
we do want automatic style checking to become a reality. If we want an
automatic style checker to be eventually introduced I think we should be
mindful of style changes unlikely to be captured by _any_ policy we may end
up having. In particular, alignment of arguments across different
statements on different functions/macros is unsupported on (most?) major
style checkers, and that's highly unlikely to ever change.
In particular, any style checker must follow strict rules in order for it
to yield consistently deterministic results (otherwise it might suffer from
termination issues). Expecting a style checker to automatically generate
heuristics that happen to match our current code configuration is not a
realistic goal, I reckon.
In this sense, having a guideline (i.e: not a rule) about trying to avoid
hand-crafted alignment where the benefit of it is not critical would be
good. In the spirit of making a complicated problem simpler rather than...
well, complicated.
Alejandro
next prev parent reply other threads:[~2023-07-19 12:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-19 10:08 [PATCH] x86/mem: Make mem_hotadd_check() more legible Andrew Cooper
2023-07-19 11:35 ` Alejandro Vallejo
2023-07-19 12:09 ` Jan Beulich
2023-07-19 12:54 ` Alejandro Vallejo [this message]
2023-07-19 13:10 ` Jan Beulich
2023-07-19 13:16 ` Jan Beulich
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=64b7dd19.170a0220.26387.994f@mx.google.com \
--to=alejandro.vallejo@cloud.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=wl@xen.org \
--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.