All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König (The Capable Hub)" <u.kleine-koenig@baylibre.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.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: Wed, 3 Jun 2026 11:43:11 +0200	[thread overview]
Message-ID: <ah_2rD9UPEYu78mv@monoceros> (raw)
In-Reply-To: <ah_Iovpb8N2OTucV@ashevche-desk.local>

[-- Attachment #1: Type: text/plain, Size: 2055 bytes --]

Hello Andy,

On Wed, Jun 03, 2026 at 09:24:34AM +0300, Andy Shevchenko wrote:
> On Wed, Jun 03, 2026 at 08:12:38AM +0200, Uwe Kleine-König (The Capable Hub) wrote:
> > On Tue, Jun 02, 2026 at 10:20:56PM +0200, Andy Shevchenko wrote:
> > > 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...
> > 
> > Oh, it works fine for me with clang 19.1.7, gcc 11.3.0, gcc 12.4.0, gcc
> > 13.3.0, gcc 14.2.0 and gcc 15.2.0, but I agree it's a bit obscure
> > because .class and .class_mask are specified twice; once by PCI_VDEVICE
> > and once explicitly.
> 
> > Which compiler are you using that breaks here? I guess I might have
> > broken more drivers this way, so it would be great to have a setup to
> > reproduce your issue.
> 
> My make command:
> 
> 	make LLVM=-19 W=1 C=1 CF=-D__CHECK_ENDIAN__ ...
> 
> The line the above error is from is from your patch.

OK, I can reproduce with that cmdline, thanks. Expect a patch in a
moment.
 
> > Once all the initializer are converted to named initialisation, we
> > should definitively drop the assignment to .class and .class_mask in
> > PCI_VDEVICE, but that doesn't work yet.
> 
> Please, address the build issue first. I'm surprised the LKP hadn't complained
> on that (yet?). Note, that all redefinitions like this are broken and need to
> be addressed.

Full ack, I didn't want to say that dropping the assignments in
PCI_VDEVICE are the way to fix this issue, but only that it's a
surprising thing in it that should be fixed as soon as possible (i.e.
not now).

Thanks
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2026-06-03  9:43 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
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) [this message]
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=ah_2rD9UPEYu78mv@monoceros \
    --to=u.kleine-koenig@baylibre.com \
    --cc=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 \
    /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.