[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86b7a1d6-9f9c-4d22-b3d8-5abdef0bb39a@gmail.com>
Date: Wed, 11 Jun 2025 22:11:21 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Andrew Lunn <andrew+netdev@...n.ch>, Paolo Abeni <pabeni@...hat.com>,
Jakub Kicinski <kuba@...nel.org>, David Miller <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Simon Horman <horms@...nel.org>,
Andrew Lunn <andrew@...n.ch>,
Russell King - ARM Linux <linux@...linux.org.uk>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: [PATCH net-next 3/4] net: phy: improve mdio-boardinfo.h
There's no need to include phy.h and mutex.h in mdio-boardinfo.h.
However mdio-boardinfo.c included phy.h indirectly this way so far,
include it explicitly instead. Whilst at it, sort the included
headers properly.
Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
---
drivers/net/phy/mdio-boardinfo.c | 7 ++++---
drivers/net/phy/mdio-boardinfo.h | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/net/phy/mdio-boardinfo.c b/drivers/net/phy/mdio-boardinfo.c
index 2b2728b68..b1e7a5920 100644
--- a/drivers/net/phy/mdio-boardinfo.c
+++ b/drivers/net/phy/mdio-boardinfo.c
@@ -3,11 +3,12 @@
* mdio-boardinfo - Collect pre-declarations for MDIO devices
*/
-#include <linux/kernel.h>
-#include <linux/slab.h>
#include <linux/export.h>
-#include <linux/mutex.h>
+#include <linux/kernel.h>
#include <linux/list.h>
+#include <linux/mutex.h>
+#include <linux/phy.h>
+#include <linux/slab.h>
#include "mdio-boardinfo.h"
diff --git a/drivers/net/phy/mdio-boardinfo.h b/drivers/net/phy/mdio-boardinfo.h
index 765c64713..0878b7787 100644
--- a/drivers/net/phy/mdio-boardinfo.h
+++ b/drivers/net/phy/mdio-boardinfo.h
@@ -7,8 +7,8 @@
#ifndef __MDIO_BOARD_INFO_H
#define __MDIO_BOARD_INFO_H
-#include <linux/phy.h>
-#include <linux/mutex.h>
+struct mii_bus;
+struct mdio_board_info;
void mdiobus_setup_mdiodev_from_board_info(struct mii_bus *bus,
int (*cb)
--
2.49.0
Powered by blists - more mailing lists