All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Sebastian Ott <sebott@redhat.com>
Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	Oliver Upton <oliver.upton@linux.dev>,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Zenghui Yu <yuzenghui@huawei.com>
Subject: Re: [PATCH 1/3] KVM: arm64: fix override-init warnings in W=1 builds
Date: Mon, 15 Jul 2024 15:40:10 +0100	[thread overview]
Message-ID: <875xt667n9.wl-maz@kernel.org> (raw)
In-Reply-To: <3b882ac0-fd2c-35df-38d7-b89cf073bcc3@redhat.com>

On Mon, 15 Jul 2024 11:28:06 +0100,
Sebastian Ott <sebott@redhat.com> wrote:
> 
> On Fri, 12 Jul 2024, Marc Zyngier wrote:
> > On Fri, 12 Jul 2024 12:03:30 +0100,
> > Sebastian Ott <sebott@redhat.com> wrote:
> >> 
> >> -static const exit_handler_fn hyp_exit_handlers[] = {
> >> -	[0 ... ESR_ELx_EC_MAX]		= NULL,
> >> +static const exit_handler_fn hyp_exit_handlers[ESR_ELx_EC_MAX + 1] = {
> > 
> > Is this really any better? I don't think so. It makes the intent
> > disappear instead of making it explicit. Intent matters *a lot*.
> 
> I'm not claiming that it's an improvement to the code.

<rant>
Silencing pointless warnings should never have priority over keeping
the code maintainable and understandable. I hope we can agree we are
not in the business of making the kernel *worse* than it already is on
that front, right?
</rant>

I like good tooling as much as the next kernel tinkerer. But W=1 is,
in its current form, quite the opposite. Mark posted a link to a 5
year old thread, showing a number of ways compilers could use extra
annotation to lift the multiple initialisation ambiguity. This
approach has seen no traction, which is a bit sad.

> But yea, I see your point. How about disabling that flag in the
> makefile?

Yes, that'd be a reasonable workaround until someone fixes the
toolchains. I see that Loongarch is already doing it for the exact
same purpose.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2024-07-15 14:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-12 11:03 [PATCH 0/3] KVM: arm64: fix warnings in W=1 build Sebastian Ott
2024-07-12 11:03 ` [PATCH 1/3] KVM: arm64: fix override-init warnings in W=1 builds Sebastian Ott
2024-07-12 21:55   ` Marc Zyngier
2024-07-15  9:35     ` Mark Rutland
2024-07-15 10:43       ` Sebastian Ott
2024-07-15 10:28     ` Sebastian Ott
2024-07-15 14:40       ` Marc Zyngier [this message]
2024-07-12 11:03 ` [PATCH 2/3] KVM: arm64: fix kdoc " Sebastian Ott
2024-07-12 11:03 ` [PATCH 3/3] KVM: arm64: vgic: fix unexpected unlock sparse warnings Sebastian Ott

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=875xt667n9.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=james.morse@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=sebott@redhat.com \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.com \
    /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.