Re: [PATCH 01/22] orion5x: Replace comments with C99 initializers
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Arnd Bergmann <arnd@xxxxxxxx>
- Subject: Re: [PATCH 01/22] orion5x: Replace comments with C99 initializers
- From: Segher Boessenkool <segher@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 28 Mar 2022 08:19:28 -0500
- Cc: Benjamin Stürz <benni@xxxxxxxxxx>, Andrew Lunn <andrew@xxxxxxx>, linux-atm-general@xxxxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, Linus Walleij <linus.walleij@xxxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, linux-pci <linux-pci@xxxxxxxxxxxxxxx>, Robert Moore <robert.moore@xxxxxxxxx>, Harald Welte <laforge@xxxxxxxxxxxx>, Alim Akhtar <alim.akhtar@xxxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, wcn36xx@xxxxxxxxxxxxxxxxxxx, Pkshih <pkshih@xxxxxxxxxxx>, "moderated list:ARM/SAMSUNG EXYNOS ARM ARCHITECTURES" <linux-samsung-soc@xxxxxxxxxxxxxxx>, ACPI Devel Maling List <linux-acpi@xxxxxxxxxxxxxxx>, linux-edac@xxxxxxxxxxxxxxx, dennis.dalessandro@xxxxxxxxxxxxxxxxxxxx, linux-rdma <linux-rdma@xxxxxxxxxxxxxxx>, Gregory CLEMENT <gregory.clement@xxxxxxxxxxx>, "Rafael J. Wysocki" <rafael.j.wysocki@xxxxxxxxx>, Russell King - ARM Linux <linux@xxxxxxxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Chas Williams <3chas3@xxxxxxxxx>, "open list:HID CORE LAYER" <linux-input@xxxxxxxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, pabeni@xxxxxxxxxx, Len Brown <lenb@xxxxxxxxxx>, mike.marciniszyn@xxxxxxxxxxxxxxxxxxxx, Robert Richter <rric@xxxxxxxxxx>, Andrew Donnellan <ajd@xxxxxxxxxxxxx>, kvalo@xxxxxxxxxx, linuxppc-dev <linuxppc-dev@xxxxxxxxxxxxxxxx>, "open list:GPIO SUBSYSTEM" <linux-gpio@xxxxxxxxxxxxxxx>, loic.poulain@xxxxxxxxxx, Borislav Petkov <bp@xxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>, Linux Media Mailing List <linux-media@xxxxxxxxxxxxxxx>, Simtec Linux Team <linux@xxxxxxxxxxxx>, Linux ARM <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "open list:ACPI COMPONENT ARCHITECTURE (ACPICA)" <devel@xxxxxxxxxx>, Karsten Keil <isdn@xxxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, Nicolas Pitre <nico@xxxxxxxxxxx>, gregkh <gregkh@xxxxxxxxxxxxxxxxxxx>, Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>, linux-wireless <linux-wireless@xxxxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, David Miller <davem@xxxxxxxxxxxxx>, James Morse <james.morse@xxxxxxx>, Networking <netdev@xxxxxxxxxxxxxxx>, Frederic Barrat <fbarrat@xxxxxxxxxxxxx>, Sebastian Hesselbarth <sebastian.hesselbarth@xxxxxxxxx>, Pali Rohár <pali@xxxxxxxxxx>, Bartosz Golaszewski <brgl@xxxxxxxx>
- In-reply-to: <CAK8P3a1e57mNUQgronhwrsXsuQW9sZYxCktKij7NwsieBWiGmw@mail.gmail.com>
- References: <20220326165909.506926-1-benni@stuerz.xyz> <CAK8P3a1e57mNUQgronhwrsXsuQW9sZYxCktKij7NwsieBWiGmw@mail.gmail.com>
- User-agent: Mutt/1.4.2.3i
On Sat, Mar 26, 2022 at 08:23:31PM +0100, Arnd Bergmann wrote:
> On Sat, Mar 26, 2022 at 5:58 PM Benjamin Stürz <benni@xxxxxxxxxx> wrote:
> >
> > This replaces comments with C99's designated
> > initializers because the kernel supports them now.
>
> The change looks fine, but the comment looks misplaced, as enum initializers
> are not c99 feature.
Yes, it is from C89/C90.
> Also, the named array and struct intializers have been
> supported by gnu89 for a long time and widely used in the kernel, so it's
> not a recent change even for the others.
GCC supports this since 1998. There was a syntax different from C99
designated initializers (".ans = 42") before (namely, "ans: 42").
1998 is long enough ago for all intents and purposes now of course ;-)
Segher
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]