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 <ayushmukkanwar@gmail.com>
Link: https://patch.msgid.link/20260511150931.93382-3-ayushmukkanwar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ayush Mukkanwar 2026-05-11 20:39:30 +05:30 committed by Greg Kroah-Hartman
parent be5e8d5f61
commit 9144251294

View File

@ -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;