[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wh=_ZmpYtCx11wqsGGdrZRHsPorTzpzh2-QccT8PGKW1w@mail.gmail.com>
Date: Wed, 25 Jun 2025 20:48:08 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Tiwei Bie <tiwei.btw@...group.com>
Cc: Johannes Berg <johannes@...solutions.net>, linux-kernel@...r.kernel.org,
linux-um@...ts.infradead.org, Richard Weinberger <richard@....at>,
Anton Ivanov <anton.ivanov@...bridgegreys.com>
Subject: Re: [GIT PULL] uml-for-6.16-rc4
On Wed, 25 Jun 2025 at 19:44, Tiwei Bie <tiwei.btw@...group.com> wrote:
>
> The behavior of gcc and clang differs. Clang's behavior appears to be
> related to the volatile qualifier in arch_spinlock_t:
Ahh. That kind of makes sense.
At the same time, I think clang is being stupid here. Yes, it makes
sense to treat volatile specially in this way - just not for an
initializer.
I realize that initializers can be made to be their own data
structures in modern C (ie taking the address of an initializer and
using the initializer itself as an argument to a function call, for
example), but when an initializer is used to set the value of a
variable, the only real thing there is that variable.
Oh well. The patch certainly looks fine and I obviously already merged
the pull request. It does make me go "I wonder how many other places
clang just generates stupid code due to this".
Linus
Powered by blists - more mailing lists