[PATCH 06/14] net: ionic: Move header files to a common location

Abhijit Gangurde
2025-04-23T10:31:09Z

Move the required header files to a common location
for use by both Ethernet and RDMA drivers.

Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
Signed-off-by: Abhijit Gangurde <abhijit.gangurde@amd.com>
---
MAINTAINERS | 1 +
drivers/net/ethernet/pensando/ionic/ionic.h | 2 +-
drivers/net/ethernet/pensando/ionic/ionic_dev.h | 4 +---
drivers/net/ethernet/pensando/ionic/ionic_lif.h | 2 +-
.../net/ethernet/pensando => include/linux}/ionic/ionic_api.h | 4 ++--
.../net/ethernet/pensando => include/linux}/ionic/ionic_if.h | 0
.../ethernet/pensando => include/linux}/ionic/ionic_regs.h | 0
7 files changed, 6 insertions(+), 7 deletions(-)
rename {drivers/net/ethernet/pensando => include/linux}/ionic/ionic_api.h (99%)
rename {drivers/net/ethernet/pensando => include/linux}/ionic/ionic_if.h (100%)
rename {drivers/net/ethernet/pensando => include/linux}/ionic/ionic_regs.h (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 96b827049501..76ee6f5004ef 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -18874,6 +18874,7 @@ L: netdev@vger.kernel.org
S: Maintained
F: Documentation/networking/device_drivers/ethernet/pensando/ionic.rst
F: drivers/net/ethernet/pensando/
+F: include/linux/ionic/

PER-CPU MEMORY ALLOCATOR
M: Dennis Zhou <dennis@kernel.org>
diff --git a/drivers/net/ethernet/pensando/ionic/ionic.h b/drivers/net/ethernet/pensando/ionic/ionic.h
index 5abdaf2fa3a6..c591f6910efb 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic.h
+++ b/drivers/net/ethernet/pensando/ionic/ionic.h
@@ -6,7 +6,7 @@

struct ionic_lif;

-#include "ionic_if.h"
+#include <linux/ionic/ionic_if.h>
#include "ionic_dev.h"
#include "ionic_devlink.h"

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_dev.h b/drivers/net/ethernet/pensando/ionic/ionic_dev.h
index cf48a6cadfce..d404a83b6021 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_dev.h
+++ b/drivers/net/ethernet/pensando/ionic/ionic_dev.h
@@ -10,9 +10,7 @@
#include <linux/skbuff.h>
#include <linux/bpf_trace.h>

-#include "ionic_if.h"
-#include "ionic_regs.h"
-#include "ionic_api.h"
+#include <linux/ionic/ionic_api.h>

#define IONIC_MAX_TX_DESC 8192
#define IONIC_MAX_RX_DESC 16384
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_lif.h b/drivers/net/ethernet/pensando/ionic/ionic_lif.h
index aae4824d08fa..18b2a8a0f014 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.h
+++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.h
@@ -10,7 +10,7 @@
#include <linux/dim.h>
#include <linux/pci.h>
#include "ionic_rx_filter.h"
-#include "ionic_api.h"
+#include <linux/ionic/ionic_api.h>

#define IONIC_ADMINQ_LENGTH 16 /* must be a power of two */
#define IONIC_NOTIFYQ_LENGTH 64 /* must be a power of two */
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_api.h b/include/linux/ionic/ionic_api.h
similarity index 99%
rename from drivers/net/ethernet/pensando/ionic/ionic_api.h
rename to include/linux/ionic/ionic_api.h
index 22d9fbb49575..e8460a485f55 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_api.h
+++ b/include/linux/ionic/ionic_api.h
@@ -5,8 +5,8 @@
#define _IONIC_API_H_

#include <linux/auxiliary_bus.h>
-#include "ionic_if.h"
-#include "ionic_regs.h"
+#include <linux/ionic/ionic_if.h>
+#include <linux/ionic/ionic_regs.h>

/**
* struct ionic_aux_dev - Auxiliary device information
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_if.h b/include/linux/ionic/ionic_if.h
similarity index 100%
rename from drivers/net/ethernet/pensando/ionic/ionic_if.h
rename to include/linux/ionic/ionic_if.h
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_regs.h b/include/linux/ionic/ionic_regs.h
similarity index 100%
rename from drivers/net/ethernet/pensando/ionic/ionic_regs.h
rename to include/linux/ionic/ionic_regs.h
--
2.34.1