netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] net: Remove the use of dev_err_probe()
@ 2025-08-20  8:57 Xichao Zhao
  2025-08-20  8:57 ` [PATCH 1/2] net: hibmcge: " Xichao Zhao
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Xichao Zhao @ 2025-08-20  8:57 UTC (permalink / raw)
  To: Hauke Mehrtens, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Jijie Shao, Jian Shen,
	Salil Mehta, open list:LANTIQ / INTEL Ethernet drivers, open list
  Cc: Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.

Xichao Zhao (2):
  net: hibmcge: Remove the use of dev_err_probe()
  net: dsa: Remove the use of dev_err_probe()

 drivers/net/dsa/lantiq_gswip.c                    | 3 +--
 drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c | 2 +-
 drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c | 3 +--
 3 files changed, 3 insertions(+), 5 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] net: hibmcge: Remove the use of dev_err_probe()
  2025-08-20  8:57 [PATCH 0/2] net: Remove the use of dev_err_probe() Xichao Zhao
@ 2025-08-20  8:57 ` Xichao Zhao
  2025-08-20  8:57 ` [PATCH 2/2] net: dsa: " Xichao Zhao
  2025-08-22  0:30 ` [PATCH 0/2] net: " patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: Xichao Zhao @ 2025-08-20  8:57 UTC (permalink / raw)
  To: Jijie Shao, Jian Shen, Salil Mehta, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	open list:HISILICON NETWORK HIBMCGE DRIVER, open list
  Cc: Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c | 2 +-
 drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c
index 2e64dc1ab355..0b92a2e5e986 100644
--- a/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c
+++ b/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c
@@ -417,7 +417,7 @@ static int hbg_pci_init(struct pci_dev *pdev)
 
 	priv->io_base = pcim_iomap_table(pdev)[0];
 	if (!priv->io_base)
-		return dev_err_probe(dev, -ENOMEM, "failed to get io base\n");
+		return -ENOMEM;
 
 	pci_set_master(pdev);
 	return 0;
diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c
index 8b7b476ed7fb..37791de47f6f 100644
--- a/drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c
+++ b/drivers/net/ethernet/hisilicon/hibmcge/hbg_mdio.c
@@ -278,8 +278,7 @@ int hbg_mdio_init(struct hbg_priv *priv)
 
 	mdio_bus = devm_mdiobus_alloc(dev);
 	if (!mdio_bus)
-		return dev_err_probe(dev, -ENOMEM,
-				     "failed to alloc MDIO bus\n");
+		return -ENOMEM;
 
 	mdio_bus->parent = dev;
 	mdio_bus->priv = priv;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] net: dsa: Remove the use of dev_err_probe()
  2025-08-20  8:57 [PATCH 0/2] net: Remove the use of dev_err_probe() Xichao Zhao
  2025-08-20  8:57 ` [PATCH 1/2] net: hibmcge: " Xichao Zhao
@ 2025-08-20  8:57 ` Xichao Zhao
  2025-08-20 11:50   ` Andrew Lunn
  2025-08-22  0:30 ` [PATCH 0/2] net: " patchwork-bot+netdevbpf
  2 siblings, 1 reply; 5+ messages in thread
From: Xichao Zhao @ 2025-08-20  8:57 UTC (permalink / raw)
  To: Hauke Mehrtens, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	open list:LANTIQ / INTEL Ethernet drivers, open list
  Cc: Xichao Zhao

The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
Therefore, remove the useless call to dev_err_probe(), and just
return the value instead.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
---
 drivers/net/dsa/lantiq_gswip.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
index 6eb3140d4044..ba080b71944c 100644
--- a/drivers/net/dsa/lantiq_gswip.c
+++ b/drivers/net/dsa/lantiq_gswip.c
@@ -1935,8 +1935,7 @@ static int gswip_gphy_fw_load(struct gswip_priv *priv, struct gswip_gphy_fw *gph
 		memcpy(fw_addr, fw->data, fw->size);
 	} else {
 		release_firmware(fw);
-		return dev_err_probe(dev, -ENOMEM,
-				     "failed to alloc firmware memory\n");
+		return -ENOMEM;
 	}
 
 	release_firmware(fw);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] net: dsa: Remove the use of dev_err_probe()
  2025-08-20  8:57 ` [PATCH 2/2] net: dsa: " Xichao Zhao
@ 2025-08-20 11:50   ` Andrew Lunn
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2025-08-20 11:50 UTC (permalink / raw)
  To: Xichao Zhao
  Cc: Hauke Mehrtens, Vladimir Oltean, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni,
	open list:LANTIQ / INTEL Ethernet drivers, open list

On Wed, Aug 20, 2025 at 04:57:49PM +0800, Xichao Zhao wrote:
> The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
> Therefore, remove the useless call to dev_err_probe(), and just
> return the value instead.
> 
> Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] net: Remove the use of dev_err_probe()
  2025-08-20  8:57 [PATCH 0/2] net: Remove the use of dev_err_probe() Xichao Zhao
  2025-08-20  8:57 ` [PATCH 1/2] net: hibmcge: " Xichao Zhao
  2025-08-20  8:57 ` [PATCH 2/2] net: dsa: " Xichao Zhao
@ 2025-08-22  0:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-08-22  0:30 UTC (permalink / raw)
  To: Xichao Zhao
  Cc: hauke, andrew, olteanv, davem, edumazet, kuba, pabeni, shaojijie,
	shenjian15, salil.mehta, netdev, linux-kernel

Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 20 Aug 2025 16:57:47 +0800 you wrote:
> The dev_err_probe() doesn't do anything when error is '-ENOMEM'.
> Therefore, remove the useless call to dev_err_probe(), and just
> return the value instead.
> 
> Xichao Zhao (2):
>   net: hibmcge: Remove the use of dev_err_probe()
>   net: dsa: Remove the use of dev_err_probe()
> 
> [...]

Here is the summary with links:
  - [1/2] net: hibmcge: Remove the use of dev_err_probe()
    https://git.kernel.org/netdev/net-next/c/ed1e7e22571c
  - [2/2] net: dsa: Remove the use of dev_err_probe()
    https://git.kernel.org/netdev/net-next/c/5e91879a7a4e

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-22  0:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-20  8:57 [PATCH 0/2] net: Remove the use of dev_err_probe() Xichao Zhao
2025-08-20  8:57 ` [PATCH 1/2] net: hibmcge: " Xichao Zhao
2025-08-20  8:57 ` [PATCH 2/2] net: dsa: " Xichao Zhao
2025-08-20 11:50   ` Andrew Lunn
2025-08-22  0:30 ` [PATCH 0/2] net: " patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).