[PATCH 1/2] net: ravb: Drop empty init callback

The init function does nothing, the bb_miiphy_init() already checks whether the .init callback is assigned, and if not, skips calling it. Remove the empty init function. The entire init callback will be removed in follow up patches.
Signed-off-by: Marek Vasut marek.vasut+renesas@mailbox.org --- Cc: Christian Marangi ansuelsmth@gmail.com Cc: Evgeny Bachinin EABachinin@salutedevices.com Cc: Ilias Apalodimas ilias.apalodimas@linaro.org Cc: Jerome Forissier jerome.forissier@linaro.org Cc: Joe Hershberger joe.hershberger@ni.com Cc: Mario Six mario.six@gdsys.cc Cc: Michal Simek michal.simek@amd.com Cc: Nobuhiro Iwamatsu iwamatsu@nigauri.org Cc: Paul Barker paul.barker.ct@bp.renesas.com Cc: Ramon Fried rfried.dev@gmail.com Cc: Simon Glass sjg@chromium.org Cc: Sughosh Ganu sughosh.ganu@linaro.org Cc: Tom Rini trini@konsulko.com Cc: u-boot@lists.denx.de --- drivers/net/ravb.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c index 7286ad19598..f9c27f0f370 100644 --- a/drivers/net/ravb.c +++ b/drivers/net/ravb.c @@ -560,11 +560,6 @@ static int ravb_remove(struct udevice *dev) return 0; }
-static int ravb_bb_init(struct bb_miiphy_bus *bus) -{ - return 0; -} - static int ravb_bb_mdio_active(struct bb_miiphy_bus *bus) { struct ravb_priv *eth = bus->priv; @@ -626,7 +621,7 @@ static int ravb_bb_delay(struct bb_miiphy_bus *bus) struct bb_miiphy_bus bb_miiphy_buses[] = { { .name = "ravb", - .init = ravb_bb_init, + .init = NULL, .mdio_active = ravb_bb_mdio_active, .mdio_tristate = ravb_bb_mdio_tristate, .set_mdio = ravb_bb_set_mdio,

The init function does nothing, the bb_miiphy_init() already checks whether the .init callback is assigned, and if not, skips calling it. Remove the empty init function. The entire init callback will be removed in follow up patches.
Signed-off-by: Marek Vasut marek.vasut+renesas@mailbox.org --- Cc: Christian Marangi ansuelsmth@gmail.com Cc: Evgeny Bachinin EABachinin@salutedevices.com Cc: Ilias Apalodimas ilias.apalodimas@linaro.org Cc: Jerome Forissier jerome.forissier@linaro.org Cc: Joe Hershberger joe.hershberger@ni.com Cc: Mario Six mario.six@gdsys.cc Cc: Michal Simek michal.simek@amd.com Cc: Nobuhiro Iwamatsu iwamatsu@nigauri.org Cc: Paul Barker paul.barker.ct@bp.renesas.com Cc: Ramon Fried rfried.dev@gmail.com Cc: Simon Glass sjg@chromium.org Cc: Sughosh Ganu sughosh.ganu@linaro.org Cc: Tom Rini trini@konsulko.com Cc: u-boot@lists.denx.de --- drivers/net/sh_eth.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index f1ce994cfd5..8654f1b8085 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c @@ -777,11 +777,6 @@ U_BOOT_DRIVER(eth_sh_ether) = { };
/******* for bb_miiphy *******/ -static int sh_eth_bb_init(struct bb_miiphy_bus *bus) -{ - return 0; -} - static int sh_eth_bb_mdio_active(struct bb_miiphy_bus *bus) { struct sh_eth_dev *eth = bus->priv; @@ -852,7 +847,7 @@ static int sh_eth_bb_delay(struct bb_miiphy_bus *bus) struct bb_miiphy_bus bb_miiphy_buses[] = { { .name = "sh_eth", - .init = sh_eth_bb_init, + .init = NULL, .mdio_active = sh_eth_bb_mdio_active, .mdio_tristate = sh_eth_bb_mdio_tristate, .set_mdio = sh_eth_bb_set_mdio,

On 18/01/2025 06:34, Marek Vasut wrote:
The init function does nothing, the bb_miiphy_init() already checks whether the .init callback is assigned, and if not, skips calling it. Remove the empty init function. The entire init callback will be removed in follow up patches.
Signed-off-by: Marek Vasut marek.vasut+renesas@mailbox.org
Cc: Christian Marangi ansuelsmth@gmail.com Cc: Evgeny Bachinin EABachinin@salutedevices.com Cc: Ilias Apalodimas ilias.apalodimas@linaro.org Cc: Jerome Forissier jerome.forissier@linaro.org Cc: Joe Hershberger joe.hershberger@ni.com Cc: Mario Six mario.six@gdsys.cc Cc: Michal Simek michal.simek@amd.com Cc: Nobuhiro Iwamatsu iwamatsu@nigauri.org Cc: Paul Barker paul.barker.ct@bp.renesas.com Cc: Ramon Fried rfried.dev@gmail.com Cc: Simon Glass sjg@chromium.org Cc: Sughosh Ganu sughosh.ganu@linaro.org Cc: Tom Rini trini@konsulko.com Cc: u-boot@lists.denx.de
drivers/net/ravb.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c index 7286ad19598..f9c27f0f370 100644 --- a/drivers/net/ravb.c +++ b/drivers/net/ravb.c @@ -560,11 +560,6 @@ static int ravb_remove(struct udevice *dev) return 0; }
-static int ravb_bb_init(struct bb_miiphy_bus *bus) -{
- return 0;
-}
static int ravb_bb_mdio_active(struct bb_miiphy_bus *bus) { struct ravb_priv *eth = bus->priv; @@ -626,7 +621,7 @@ static int ravb_bb_delay(struct bb_miiphy_bus *bus) struct bb_miiphy_bus bb_miiphy_buses[] = { { .name = "ravb",
.init = ravb_bb_init,
.init = NULL,
Do we need to explicitly set this to NULL? The field should be initialised to zero if we omit it.
Thanks,

On 1/21/25 1:07 PM, Paul Barker wrote:
On 18/01/2025 06:34, Marek Vasut wrote:
The init function does nothing, the bb_miiphy_init() already checks whether the .init callback is assigned, and if not, skips calling it. Remove the empty init function. The entire init callback will be removed in follow up patches.
Signed-off-by: Marek Vasut marek.vasut+renesas@mailbox.org
Cc: Christian Marangi ansuelsmth@gmail.com Cc: Evgeny Bachinin EABachinin@salutedevices.com Cc: Ilias Apalodimas ilias.apalodimas@linaro.org Cc: Jerome Forissier jerome.forissier@linaro.org Cc: Joe Hershberger joe.hershberger@ni.com Cc: Mario Six mario.six@gdsys.cc Cc: Michal Simek michal.simek@amd.com Cc: Nobuhiro Iwamatsu iwamatsu@nigauri.org Cc: Paul Barker paul.barker.ct@bp.renesas.com Cc: Ramon Fried rfried.dev@gmail.com Cc: Simon Glass sjg@chromium.org Cc: Sughosh Ganu sughosh.ganu@linaro.org Cc: Tom Rini trini@konsulko.com Cc: u-boot@lists.denx.de
drivers/net/ravb.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c index 7286ad19598..f9c27f0f370 100644 --- a/drivers/net/ravb.c +++ b/drivers/net/ravb.c @@ -560,11 +560,6 @@ static int ravb_remove(struct udevice *dev) return 0; }
-static int ravb_bb_init(struct bb_miiphy_bus *bus) -{
- return 0;
-}
- static int ravb_bb_mdio_active(struct bb_miiphy_bus *bus) { struct ravb_priv *eth = bus->priv;
@@ -626,7 +621,7 @@ static int ravb_bb_delay(struct bb_miiphy_bus *bus) struct bb_miiphy_bus bb_miiphy_buses[] = { { .name = "ravb",
.init = ravb_bb_init,
.init = NULL,
Do we need to explicitly set this to NULL? The field should be initialised to zero if we omit it.
I don't think it does, this is only a safety assignment until this .init callback gets fully removed in follow up series.

On 1/21/25 1:15 PM, Marek Vasut wrote:
On 1/21/25 1:07 PM, Paul Barker wrote:
On 18/01/2025 06:34, Marek Vasut wrote:
The init function does nothing, the bb_miiphy_init() already checks whether the .init callback is assigned, and if not, skips calling it. Remove the empty init function. The entire init callback will be removed in follow up patches.
Signed-off-by: Marek Vasut marek.vasut+renesas@mailbox.org
Cc: Christian Marangi ansuelsmth@gmail.com Cc: Evgeny Bachinin EABachinin@salutedevices.com Cc: Ilias Apalodimas ilias.apalodimas@linaro.org Cc: Jerome Forissier jerome.forissier@linaro.org Cc: Joe Hershberger joe.hershberger@ni.com Cc: Mario Six mario.six@gdsys.cc Cc: Michal Simek michal.simek@amd.com Cc: Nobuhiro Iwamatsu iwamatsu@nigauri.org Cc: Paul Barker paul.barker.ct@bp.renesas.com Cc: Ramon Fried rfried.dev@gmail.com Cc: Simon Glass sjg@chromium.org Cc: Sughosh Ganu sughosh.ganu@linaro.org Cc: Tom Rini trini@konsulko.com Cc: u-boot@lists.denx.de
drivers/net/ravb.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c index 7286ad19598..f9c27f0f370 100644 --- a/drivers/net/ravb.c +++ b/drivers/net/ravb.c @@ -560,11 +560,6 @@ static int ravb_remove(struct udevice *dev) return 0; } -static int ravb_bb_init(struct bb_miiphy_bus *bus) -{ - return 0; -}
static int ravb_bb_mdio_active(struct bb_miiphy_bus *bus) { struct ravb_priv *eth = bus->priv; @@ -626,7 +621,7 @@ static int ravb_bb_delay(struct bb_miiphy_bus *bus) struct bb_miiphy_bus bb_miiphy_buses[] = { { .name = "ravb", - .init = ravb_bb_init, + .init = NULL,
Do we need to explicitly set this to NULL? The field should be initialised to zero if we omit it.
I don't think it does, this is only a safety assignment until this .init callback gets fully removed in follow up series.
I would like to pick these two patches for the upcoming release, is that OK with you ?
participants (3)
-
Marek Vasut
-
Marek Vasut
-
Paul Barker