From: Ayush Mukkanwar Date: Mon, 11 May 2026 15:09:30 +0000 (+0530) Subject: staging: octeon: ethernet: replace pr_err and pr_info with dev_err and netdev_err X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=91442512943b50329f8f20ffc5db28e53782aff7;p=thirdparty%2Fkernel%2Fstable.git staging: octeon: ethernet: replace pr_err and pr_info with dev_err and netdev_err Replace pr_err() and pr_info() calls in cvm_oct_probe() with dev_err(), netdev_err(), and netdev_info() to include device information in log messages. Use dev_err() where no net_device is available (allocation failures), and netdev_err()/netdev_info() where a net_device exists. Signed-off-by: Ayush Mukkanwar Link: https://patch.msgid.link/20260511150931.93382-3-ayushmukkanwar@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c index 31464ed63b58..eaa4f04093b8 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c @@ -685,7 +685,7 @@ static int cvm_oct_probe(struct platform_device *pdev) pip = pdev->dev.of_node; if (!pip) { - pr_err("Error: No 'pip' in /aliases\n"); + dev_err(&pdev->dev, "No 'pip' in /aliases\n"); return -EINVAL; } @@ -783,16 +783,16 @@ static int cvm_oct_probe(struct platform_device *pdev) dev->max_mtu = OCTEON_MAX_MTU - mtu_overhead; if (register_netdev(dev) < 0) { - pr_err("Failed to register ethernet device for POW\n"); + netdev_err(dev, "Failed to register ethernet device for POW\n"); free_netdev(dev); } else { cvm_oct_device[CVMX_PIP_NUM_INPUT_PORTS] = dev; - pr_info("%s: POW send group %d, receive group %d\n", - dev->name, pow_send_group, - pow_receive_group); + netdev_info(dev, "POW send group %d, receive group %d\n", + pow_send_group, + pow_receive_group); } } else { - pr_err("Failed to allocate ethernet device for POW\n"); + dev_err(&pdev->dev, "Failed to allocate ethernet device for POW\n"); } } @@ -812,8 +812,8 @@ static int cvm_oct_probe(struct platform_device *pdev) struct net_device *dev = alloc_etherdev(sizeof(struct octeon_ethernet)); if (!dev) { - pr_err("Failed to allocate ethernet device for port %d\n", - port); + dev_err(&pdev->dev, "Failed to allocate ethernet device for port %d\n", + port); continue; } @@ -897,8 +897,8 @@ static int cvm_oct_probe(struct platform_device *pdev) if (!dev->netdev_ops) { free_netdev(dev); } else if (register_netdev(dev) < 0) { - pr_err("Failed to register ethernet device for interface %d, port %d\n", - interface, priv->port); + netdev_err(dev, "Failed to register ethernet device for interface %d, port %d\n", + interface, priv->port); free_netdev(dev); } else { cvm_oct_device[priv->port] = dev;