From: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
To: Arthur Kiyanovski <akiyano@amazon.com>,
David Arinzon <darinzon@amazon.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>
Cc: Simon Horman <horms@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>,
Guangshuo Li <lgs201920130244@gmail.com>,
Ioana Ciornei <ioana.ciornei@nxp.com>,
Sang-Heon Jeon <ekffu200098@gmail.com>,
Dawei Feng <dawei.feng@seu.edu.cn>,
netdev@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next] net: ena: Fold header containing PCI id definitions into driver
Date: Mon, 2 Nov 2026 12:09:05 +0100 [thread overview]
Message-ID: <20261102110907.356621-2-u.kleine-koenig@baylibre.com> (raw)
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@baylibre.com>
---
Hello,
I'm currently working on deprecating <linux/mod_devicetable.h> and my
check script stumbled over the header removed here as it used
pci_device_id without including a header to get its definition. Instead
of adding one, simplify the situation a bit.
The change with the trailing comma is maybe subjective, I don't feel
strong here and can drop it if desired.
Best regards
Uwe
.../device_drivers/ethernet/amazon/ena.rst | 1 -
drivers/net/ethernet/amazon/ena/ena_netdev.c | 18 +++++++-
.../net/ethernet/amazon/ena/ena_pci_id_tbl.h | 45 -------------------
3 files changed, 17 insertions(+), 47 deletions(-)
delete mode 100644 drivers/net/ethernet/amazon/ena/ena_pci_id_tbl.h
diff --git a/Documentation/networking/device_drivers/ethernet/amazon/ena.rst b/Documentation/networking/device_drivers/ethernet/amazon/ena.rst
index 14784a0a6a8a..72ea5ebf2f71 100644
--- a/Documentation/networking/device_drivers/ethernet/amazon/ena.rst
+++ b/Documentation/networking/device_drivers/ethernet/amazon/ena.rst
@@ -55,7 +55,6 @@ ena_regs_defs.h Definition of ENA PCI memory-mapped (MMIO) registers.
ena_netdev.[ch] Main Linux kernel driver.
ena_ethtool.c ethtool callbacks.
ena_xdp.[ch] XDP files
-ena_pci_id_tbl.h Supported device IDs.
ena_phc.[ch] PTP hardware clock infrastructure (see `PHC`_ for more info)
ena_devlink.[ch] devlink files.
ena_debugfs.[ch] debugfs files.
diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c
index 7eb6456ed0d5..c934d1e922e5 100644
--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c
+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c
@@ -16,7 +16,6 @@
#include <net/ip.h>
#include "ena_netdev.h"
-#include "ena_pci_id_tbl.h"
#include "ena_xdp.h"
#include "ena_phc.h"
@@ -41,6 +40,23 @@ static struct ena_aenq_handlers aenq_handlers;
static struct workqueue_struct *ena_wq;
+#define PCI_DEV_ID_ENA_LLQ_PF 0x1ec2
+#define PCI_DEV_ID_ENA_LLQ_VF 0xec21
+#define PCI_DEV_ID_ENA_PF 0x0ec2
+#define PCI_DEV_ID_ENA_VF 0xec20
+#define PCI_DEV_ID_ENA_RESRV0 0x0051
+
+#define ENA_PCI_ID_TABLE_ENTRY(devid) \
+ { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, devid) }
+
+static const struct pci_device_id ena_pci_tbl[] = {
+ ENA_PCI_ID_TABLE_ENTRY(PCI_DEV_ID_ENA_RESRV0),
+ ENA_PCI_ID_TABLE_ENTRY(PCI_DEV_ID_ENA_PF),
+ ENA_PCI_ID_TABLE_ENTRY(PCI_DEV_ID_ENA_LLQ_PF),
+ ENA_PCI_ID_TABLE_ENTRY(PCI_DEV_ID_ENA_VF),
+ ENA_PCI_ID_TABLE_ENTRY(PCI_DEV_ID_ENA_LLQ_VF),
+ { }
+};
MODULE_DEVICE_TABLE(pci, ena_pci_tbl);
static int ena_rss_init_default(struct ena_adapter *adapter);
diff --git a/drivers/net/ethernet/amazon/ena/ena_pci_id_tbl.h b/drivers/net/ethernet/amazon/ena/ena_pci_id_tbl.h
deleted file mode 100644
index 3ecdf29160ca..000000000000
--- a/drivers/net/ethernet/amazon/ena/ena_pci_id_tbl.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */
-/*
- * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All rights reserved.
- */
-
-#ifndef ENA_PCI_ID_TBL_H_
-#define ENA_PCI_ID_TBL_H_
-
-#ifndef PCI_VENDOR_ID_AMAZON
-#define PCI_VENDOR_ID_AMAZON 0x1d0f
-#endif
-
-#ifndef PCI_DEV_ID_ENA_PF
-#define PCI_DEV_ID_ENA_PF 0x0ec2
-#endif
-
-#ifndef PCI_DEV_ID_ENA_LLQ_PF
-#define PCI_DEV_ID_ENA_LLQ_PF 0x1ec2
-#endif
-
-#ifndef PCI_DEV_ID_ENA_VF
-#define PCI_DEV_ID_ENA_VF 0xec20
-#endif
-
-#ifndef PCI_DEV_ID_ENA_LLQ_VF
-#define PCI_DEV_ID_ENA_LLQ_VF 0xec21
-#endif
-
-#ifndef PCI_DEV_ID_ENA_RESRV0
-#define PCI_DEV_ID_ENA_RESRV0 0x0051
-#endif
-
-#define ENA_PCI_ID_TABLE_ENTRY(devid) \
- {PCI_DEVICE(PCI_VENDOR_ID_AMAZON, devid)},
-
-static const struct pci_device_id ena_pci_tbl[] = {
- ENA_PCI_ID_TABLE_ENTRY(PCI_DEV_ID_ENA_RESRV0)
- ENA_PCI_ID_TABLE_ENTRY(PCI_DEV_ID_ENA_PF)
- ENA_PCI_ID_TABLE_ENTRY(PCI_DEV_ID_ENA_LLQ_PF)
- ENA_PCI_ID_TABLE_ENTRY(PCI_DEV_ID_ENA_VF)
- ENA_PCI_ID_TABLE_ENTRY(PCI_DEV_ID_ENA_LLQ_VF)
- { }
-};
-
-#endif /* ENA_PCI_ID_TBL_H_ */
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
--
2.56.0.rc1
next reply other threads:[~2026-11-02 11:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 11:09 Uwe Kleine-König [this message]
2026-11-02 21:49 ` Arthur Kiyanovski
2026-11-03 6:41 ` Uwe Kleine-König
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=20261102110907.356621-2-u.kleine-koenig@baylibre.com \
--to=u.kleine-koenig@baylibre.com \
--cc=akiyano@amazon.com \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=darinzon@amazon.com \
--cc=davem@davemloft.net \
--cc=dawei.feng@seu.edu.cn \
--cc=edumazet@kernel.org \
--cc=ekffu200098@gmail.com \
--cc=horms@kernel.org \
--cc=ioana.ciornei@nxp.com \
--cc=kuba@kernel.org \
--cc=lgs201920130244@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®