Re: [PATCH net-next] net: ena: Fold header containing PCI id definitions into driver

From: Uwe Kleine-König

Date: Tue Nov 03 2026 - 01:42:05 EST


Hello Arthur,

On Mon, Nov 02, 2026 at 09:49:24PM +0000, Arthur Kiyanovski wrote:
> On Mon, 02 Nov 2026 12:09:05 +0100, Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx> wrote:
> > The file ena_pci_id_tbl.h is only included once. Fold it into its only
> > consumer, simplifying a bit en passant.
> >
> > Note that I took out the trailing comma from the expanded value of
> > ENA_PCI_ID_TABLE_ENTRY() and thus these commas have to be added when the
> > macro is used improving readability.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx>
>
> I'd prefer to keep ena_pci_id_tbl.h as a separate file - ena_netdev.c is
> already by far the largest file in the driver, and I'd rather not grow it
> further when there's an alternative.

File size isn't a relevant metric for me, but I can live with it that
it's one for you.

> You're right about the missing definition though, and I think we can fix
> that by adding #include <linux/pci.h> to ena_pci_id_tbl.h instead. Would
> that satisfy your check script?

It would, the minimal header to achieve that is <linux/device-id/pci.h>.
I'd stick to that for v2.

> The rest of the cleanup can be applied to the header instead:
>
> - drop the #ifndef guards around the PCI_DEV_ID_ENA_* defines, nothing
> defines those names anymore
> - drop the PCI_VENDOR_ID_AMAZON fallback too, <linux/pci_ids.h> has had
> it since 4.18
> - keep the trailing comma change, that's how the other drivers do it
> (mlx4, e1000, cxgb4, qlcnic, ...)
>
> Would you mind respinning along those lines?

Will respin later today or tomorrow.

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature