From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Markus Schneider-Pargmann <msp@baylibre.com>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] serial: 8250_pci: Consistently define pci_device_ids using named initializers
Date: Tue, 2 Jun 2026 22:20:56 +0200 [thread overview]
Message-ID: <ah87KOm0nfAyvr4c@black.igk.intel.com> (raw)
In-Reply-To: <20260428144033.1037617-2-u.kleine-koenig@baylibre.com>
On Tue, Apr 28, 2026 at 04:40:33PM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> ... and PCI device helpers.
>
> The various struct pci_device_id were defined using a mixture of
> initialization by position and by name. Some use the PCI device helpers
> (like PCI_DEVICE and PCI_DEVICE_SUB) and others don't.
>
> Consistently use named initializers, drop assignments of 0 by position
> for .class and .class_mask and use the PCI device helpers. Also use
> consistent line-breaks and positioning for opening and closing curly
> braces.
>
> The secret plan is to make struct pci_device_id::driver_data an
> anonymous union (similar to
> https://lore.kernel.org/all/cover.1776579304.git.u.kleine-koenig@baylibre.com/)
> and that requires named initializers. But it's also a nice cleanup on
> its own.
>
> This patch doesn't change the compiled result; this was verified using
> an allmodconfig with several things disabled that make reproducible
> builds harder on x86 and arm64.
This patch broke the build.
drivers/tty/serial/8250/8250_pci.c:5398:12: error: initializer overrides prior initialization of this subobject [-Werror,-Winitializer-overrides]
5398 | .class = PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/pci_ids.h:74:45: note: expanded from macro 'PCI_CLASS_COMMUNICATION_MULTISERIAL'
74 | #define PCI_CLASS_COMMUNICATION_MULTISERIAL 0x0702
and so on...
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-06-02 20:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 14:40 [PATCH v3] serial: 8250_pci: Consistently define pci_device_ids using named initializers Uwe Kleine-König (The Capable Hub)
2026-06-02 20:20 ` Andy Shevchenko [this message]
2026-06-03 6:12 ` Uwe Kleine-König (The Capable Hub)
2026-06-03 6:24 ` Andy Shevchenko
2026-06-03 9:43 ` Uwe Kleine-König (The Capable Hub)
2026-06-03 9:53 ` Andy Shevchenko
2026-06-03 11:21 ` Uwe Kleine-König (The Capable Hub)
2026-06-03 14:00 ` Andy Shevchenko
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=ah87KOm0nfAyvr4c@black.igk.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=msp@baylibre.com \
--cc=u.kleine-koenig@baylibre.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.