From: Ayush Mukkanwar <ayushmukkanwar@gmail.com>
To: gregkh@linuxfoundation.org, dan.carpenter@linaro.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Ayush Mukkanwar <ayushmukkanwar@gmail.com>
Subject: [PATCH v6 2/3] staging: octeon: ethernet: replace pr_err and pr_info with dev_err and netdev_err
Date: Mon, 4 May 2026 23:11:45 +0530 [thread overview]
Message-ID: <20260504174146.117026-3-ayushmukkanwar@gmail.com> (raw)
In-Reply-To: <20260504174146.117026-1-ayushmukkanwar@gmail.com>
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>
---
drivers/staging/octeon/ethernet.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index badf5ceaf5b4..27c282ef64dd 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;
--
2.53.0
next prev parent reply other threads:[~2026-05-04 17:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 17:41 [PATCH v6 0/3] staging: octeon: replace pr_* with dev_* logging Ayush Mukkanwar
2026-05-04 17:41 ` [PATCH v6 1/3] staging: octeon: ethernet-mem: replace pr_warn with dev_warn in free functions Ayush Mukkanwar
2026-05-11 7:56 ` Greg KH
2026-05-04 17:41 ` Ayush Mukkanwar [this message]
2026-05-04 17:41 ` [PATCH v6 3/3] staging: octeon: replace pr_warn with dev_warn in fill path and refactor rx group to per-device state Ayush Mukkanwar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260504174146.117026-3-ayushmukkanwar@gmail.com \
--to=ayushmukkanwar@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox