From: Lukas Wunner <lukas@wunner.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Will Deacon <will@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Arnd Bergmann <arnd@kernel.org>,
Russell King - ARM Linux admin <linux@armlinux.org.uk>,
linux-toolchains@vger.kernel.org,
Mark Rutland <mark.rutland@arm.com>,
Theodore Ts'o <tytso@mit.edu>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andreas Dilger <adilger.kernel@dilger.ca>,
Ext4 Developers List <linux-ext4@vger.kernel.org>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues
Date: Thu, 14 Jan 2021 14:13:48 +0100 [thread overview]
Message-ID: <20210114131348.GA1343@wunner.de> (raw)
In-Reply-To: <CAHk-=wiHaVWUKQ9wvHe5D=JrV3MDehfRi_FL7KXGbi6=S7=jUA@mail.gmail.com>
On Tue, Jan 12, 2021 at 09:28:32AM -0800, Linus Torvalds wrote:
> On Tue, Jan 12, 2021 at 5:20 AM Lukas Wunner <lukas@wunner.de> wrote:
> > > Variable declarations in for-loops is the only one I can think of. I
> > > think that would clean up some code (and some macros), but might not
> > > be compelling on its own.
> >
> > Anonymous structs/unions. I used to have a use case for that in
> > struct efi_dev_path in include/linux/efi.h, but Ard Biesheuvel
> > refactored it in a gnu89-compatible way for v5.7 with db8952e7094f.
>
> We use anonymous structs/unions extensively and all over the place already.
Yes, my apologies, I mixed things up.
Back in 2016 when I authored 46cd4b75cd0e, what I wanted to do was
include an unnamed "struct efi_generic_dev_path;" in struct efi_dev_path:
struct efi_dev_path {
struct efi_generic_dev_path;
union {
struct {
u32 hid;
u32 uid;
} acpi;
struct {
u8 fn;
u8 dev;
} pci;
};
} __attribute ((packed));
The alternative is to copy-paste the elements of struct efi_dev_path
or to give it a name such as "header" (which is what db8952e7094f
subsequently did). Both options seemed inelegant to me.
However it turns out this feature requires -fms-extensions.
It's not part of -std=gnu11.
So coming back to topic, yes there doesn't seem to be too much to
be gained from moving to -std=gnu11 aside from variable declarations
in for-loops.
(And it really has to be -std=gnu11 because -std=c11 fails to compile.)
Thanks,
Lukas
prev parent reply other threads:[~2021-01-14 13:23 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-05 15:47 Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues Russell King - ARM Linux admin
2021-01-05 18:27 ` Darrick J. Wong
2021-01-05 19:50 ` Russell King - ARM Linux admin
2021-01-06 11:53 ` Mark Rutland
2021-01-06 12:13 ` Russell King - ARM Linux admin
2021-01-06 13:52 ` Russell King - ARM Linux admin
2021-01-06 17:20 ` Will Deacon
2021-01-06 17:46 ` Russell King - ARM Linux admin
2021-01-06 21:04 ` Arnd Bergmann
2021-01-06 22:00 ` Arnd Bergmann
2021-01-06 22:32 ` Russell King - ARM Linux admin
2021-01-07 11:18 ` Russell King - ARM Linux admin
2021-01-07 12:45 ` Russell King - ARM Linux admin
2021-01-07 13:16 ` Arnd Bergmann
2021-01-07 13:37 ` Russell King - ARM Linux admin
2021-01-07 16:27 ` Theodore Ts'o
2021-01-07 17:00 ` Florian Weimer
2021-01-07 21:48 ` Arnd Bergmann
2021-01-07 22:14 ` Russell King - ARM Linux admin
2021-01-07 22:41 ` Eric Biggers
2021-01-08 8:21 ` Ard Biesheuvel
2021-01-07 22:27 ` Eric Biggers
2021-01-07 23:53 ` Darrick J. Wong
2021-01-08 8:05 ` Arnd Bergmann
2021-01-08 9:13 ` Peter Zijlstra
2021-01-08 10:31 ` Pavel Machek
2021-01-07 21:20 ` Arnd Bergmann
2021-01-08 9:21 ` Peter Zijlstra
2021-01-08 9:26 ` Will Deacon
2021-01-08 20:02 ` Linus Torvalds
2021-01-08 20:22 ` Arnd Bergmann
2021-01-08 21:20 ` Nick Desaulniers
2021-01-08 20:29 ` Russell King - ARM Linux admin
2021-01-12 13:20 ` Lukas Wunner
2021-01-12 13:31 ` Florian Weimer
2021-01-12 13:46 ` David Laight
2021-01-12 17:28 ` Linus Torvalds
2021-01-14 13:13 ` Lukas Wunner [this message]
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=20210114131348.GA1343@wunner.de \
--to=lukas@wunner.de \
--cc=adilger.kernel@dilger.ca \
--cc=arnd@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-toolchains@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mark.rutland@arm.com \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=will@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).