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

From: Arthur Kiyanovski

Date: Mon Nov 02 2026 - 17:17:09 EST


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>

Hi Uwe,

Thanks for the patch.

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.

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?

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?

Thanks,
Arthur

--
Arthur Kiyanovski <akiyano@xxxxxxxxxx>