* [PATCH] serial: 8250_pci: fix -Winitializer-overrides for Brainboxes UC-260/271/701/756 entries
@ 2026-06-03 23:26 Rosen Penev
2026-07-10 12:32 ` Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Rosen Penev @ 2026-06-03 23:26 UTC (permalink / raw)
To: linux-serial
Cc: Greg Kroah-Hartman, Jiri Slaby, Nathan Chancellor,
Nick Desaulniers, Bill Wendling, Justin Stitt,
open list:TTY LAYER AND SERIAL DRIVERS,
open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b
PCI_VDEVICE() expands to set .class=0 and .class_mask=0, but the Brainboxes UC-260/271/701/756 entries immediately override those fields. This causes a build error with clang -Werror,-Winitializer-overrides.
Fix by expanding PCI_VDEVICE() manually, omitting the trailing .class/.class_mask zeroes so each field is set exactly once.
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/tty/serial/8250/8250_pci.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 3e5bc9e8d269..0513f4b3c093 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -5394,12 +5394,14 @@ static const struct pci_device_id serial_pci_tbl[] = {
* Brainboxes UC-260/271/701/756
*/
{
- PCI_VDEVICE(INTASHIELD, 0x0D21),
+ .vendor = PCI_VENDOR_ID_INTASHIELD, .device = 0x0D21,
+ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
.class = PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
.class_mask = 0xffff00,
.driver_data = pbn_b2_4_115200,
}, {
- PCI_VDEVICE(INTASHIELD, 0x0E34),
+ .vendor = PCI_VENDOR_ID_INTASHIELD, .device = 0x0E34,
+ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
.class = PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
.class_mask = 0xffff00,
.driver_data = pbn_b2_4_115200,
--
2.54.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] serial: 8250_pci: fix -Winitializer-overrides for Brainboxes UC-260/271/701/756 entries
2026-06-03 23:26 [PATCH] serial: 8250_pci: fix -Winitializer-overrides for Brainboxes UC-260/271/701/756 entries Rosen Penev
@ 2026-07-10 12:32 ` Greg Kroah-Hartman
0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2026-07-10 12:32 UTC (permalink / raw)
To: Rosen Penev
Cc: linux-serial, Jiri Slaby, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt,
open list:TTY LAYER AND SERIAL DRIVERS,
open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b
On Wed, Jun 03, 2026 at 04:26:51PM -0700, Rosen Penev wrote:
> PCI_VDEVICE() expands to set .class=0 and .class_mask=0, but the Brainboxes UC-260/271/701/756 entries immediately override those fields. This causes a build error with clang -Werror,-Winitializer-overrides.
>
> Fix by expanding PCI_VDEVICE() manually, omitting the trailing .class/.class_mask zeroes so each field is set exactly once.
Please properly wrap your changelog text.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] serial: 8250_pci: fix -Winitializer-overrides for Brainboxes UC-260/271/701/756 entries
@ 2026-05-28 20:12 Rosen Penev
2026-07-07 15:21 ` Greg Kroah-Hartman
0 siblings, 1 reply; 5+ messages in thread
From: Rosen Penev @ 2026-05-28 20:12 UTC (permalink / raw)
To: linux-serial
Cc: Greg Kroah-Hartman, Jiri Slaby, Nathan Chancellor,
Nick Desaulniers, Bill Wendling, Justin Stitt,
open list:TTY LAYER AND SERIAL DRIVERS,
open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b
PCI_VDEVICE() expands to set .class=0 and .class_mask=0, but the Brainboxes
UC-260/271/701/756 entries immediately override those fields. This causes
a build error with clang -Werror,-Winitializer-overrides.
Fix by expanding PCI_VDEVICE() manually, omitting the trailing
.class/.class_mask zeroes so each field is set exactly once.
Found with W=1
Assisted-by: Opencode:Big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
drivers/tty/serial/8250/8250_pci.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
index 3e5bc9e8d269..0513f4b3c093 100644
--- a/drivers/tty/serial/8250/8250_pci.c
+++ b/drivers/tty/serial/8250/8250_pci.c
@@ -5394,12 +5394,14 @@ static const struct pci_device_id serial_pci_tbl[] = {
* Brainboxes UC-260/271/701/756
*/
{
- PCI_VDEVICE(INTASHIELD, 0x0D21),
+ .vendor = PCI_VENDOR_ID_INTASHIELD, .device = 0x0D21,
+ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
.class = PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
.class_mask = 0xffff00,
.driver_data = pbn_b2_4_115200,
}, {
- PCI_VDEVICE(INTASHIELD, 0x0E34),
+ .vendor = PCI_VENDOR_ID_INTASHIELD, .device = 0x0E34,
+ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
.class = PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
.class_mask = 0xffff00,
.driver_data = pbn_b2_4_115200,
--
2.54.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] serial: 8250_pci: fix -Winitializer-overrides for Brainboxes UC-260/271/701/756 entries
2026-05-28 20:12 Rosen Penev
@ 2026-07-07 15:21 ` Greg Kroah-Hartman
2026-07-07 19:57 ` Rosen Penev
0 siblings, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2026-07-07 15:21 UTC (permalink / raw)
To: Rosen Penev
Cc: linux-serial, Jiri Slaby, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt,
open list:TTY LAYER AND SERIAL DRIVERS,
open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b
On Thu, May 28, 2026 at 01:12:50PM -0700, Rosen Penev wrote:
> PCI_VDEVICE() expands to set .class=0 and .class_mask=0, but the Brainboxes
> UC-260/271/701/756 entries immediately override those fields. This causes
> a build error with clang -Werror,-Winitializer-overrides.
>
> Fix by expanding PCI_VDEVICE() manually, omitting the trailing
> .class/.class_mask zeroes so each field is set exactly once.
>
> Found with W=1
>
> Assisted-by: Opencode:Big-pickle
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
> drivers/tty/serial/8250/8250_pci.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
> index 3e5bc9e8d269..0513f4b3c093 100644
> --- a/drivers/tty/serial/8250/8250_pci.c
> +++ b/drivers/tty/serial/8250/8250_pci.c
> @@ -5394,12 +5394,14 @@ static const struct pci_device_id serial_pci_tbl[] = {
> * Brainboxes UC-260/271/701/756
> */
> {
> - PCI_VDEVICE(INTASHIELD, 0x0D21),
> + .vendor = PCI_VENDOR_ID_INTASHIELD, .device = 0x0D21,
> + .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
> .class = PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
> .class_mask = 0xffff00,
> .driver_data = pbn_b2_4_115200,
> }, {
> - PCI_VDEVICE(INTASHIELD, 0x0E34),
> + .vendor = PCI_VENDOR_ID_INTASHIELD, .device = 0x0E34,
> + .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
> .class = PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
> .class_mask = 0xffff00,
> .driver_data = pbn_b2_4_115200,
> --
> 2.54.0
>
Does not apply to the current tree :(
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] serial: 8250_pci: fix -Winitializer-overrides for Brainboxes UC-260/271/701/756 entries
2026-07-07 15:21 ` Greg Kroah-Hartman
@ 2026-07-07 19:57 ` Rosen Penev
0 siblings, 0 replies; 5+ messages in thread
From: Rosen Penev @ 2026-07-07 19:57 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-serial, Jiri Slaby, Nathan Chancellor, Nick Desaulniers,
Bill Wendling, Justin Stitt,
open list:TTY LAYER AND SERIAL DRIVERS,
open list:CLANG/LLVM BUILD SUPPORT:Keyword:b(?i:clang|llvm)b
On Tue, Jul 7, 2026 at 8:21 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Thu, May 28, 2026 at 01:12:50PM -0700, Rosen Penev wrote:
> > PCI_VDEVICE() expands to set .class=0 and .class_mask=0, but the Brainboxes
> > UC-260/271/701/756 entries immediately override those fields. This causes
> > a build error with clang -Werror,-Winitializer-overrides.
> >
> > Fix by expanding PCI_VDEVICE() manually, omitting the trailing
> > .class/.class_mask zeroes so each field is set exactly once.
> >
> > Found with W=1
> >
> > Assisted-by: Opencode:Big-pickle
> > Signed-off-by: Rosen Penev <rosenp@gmail.com>
> > ---
> > drivers/tty/serial/8250/8250_pci.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c
> > index 3e5bc9e8d269..0513f4b3c093 100644
> > --- a/drivers/tty/serial/8250/8250_pci.c
> > +++ b/drivers/tty/serial/8250/8250_pci.c
> > @@ -5394,12 +5394,14 @@ static const struct pci_device_id serial_pci_tbl[] = {
> > * Brainboxes UC-260/271/701/756
> > */
> > {
> > - PCI_VDEVICE(INTASHIELD, 0x0D21),
> > + .vendor = PCI_VENDOR_ID_INTASHIELD, .device = 0x0D21,
> > + .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
> > .class = PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
> > .class_mask = 0xffff00,
> > .driver_data = pbn_b2_4_115200,
> > }, {
> > - PCI_VDEVICE(INTASHIELD, 0x0E34),
> > + .vendor = PCI_VENDOR_ID_INTASHIELD, .device = 0x0E34,
> > + .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID,
> > .class = PCI_CLASS_COMMUNICATION_MULTISERIAL << 8,
> > .class_mask = 0xffff00,
> > .driver_data = pbn_b2_4_115200,
> > --
> > 2.54.0
> >
>
> Does not apply to the current tree :(
This appears to have been fixed in 426e83cab1f5d53069ac7030cb03e2d7c6367ef1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-07-10 12:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03 23:26 [PATCH] serial: 8250_pci: fix -Winitializer-overrides for Brainboxes UC-260/271/701/756 entries Rosen Penev
2026-07-10 12:32 ` Greg Kroah-Hartman
-- strict thread matches above, loose matches on Subject: below --
2026-05-28 20:12 Rosen Penev
2026-07-07 15:21 ` Greg Kroah-Hartman
2026-07-07 19:57 ` Rosen Penev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox