DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Hemant Agrawal <hemant.agrawal@nxp.com>,
	Sachin Saxena <sachin.saxena@nxp.com>
Subject: [PATCH 2/4] bus/dpaa: replace perror with log
Date: Sun, 28 Dec 2025 12:10:51 -0800	[thread overview]
Message-ID: <20251228201649.555898-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20251228201649.555898-1-stephen@networkplumber.org>

Use existing logging instead of calling perror.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/bus/dpaa/base/qbman/process.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/bus/dpaa/base/qbman/process.c b/drivers/bus/dpaa/base/qbman/process.c
index 2d805c5bd9..77362cd6e5 100644
--- a/drivers/bus/dpaa/base/qbman/process.c
+++ b/drivers/bus/dpaa/base/qbman/process.c
@@ -142,7 +142,7 @@ int process_portal_map(struct dpaa_ioctl_portal_map *params)
 
 	ret = ioctl(fd, DPAA_IOCTL_PORTAL_MAP, params);
 	if (ret) {
-		perror("ioctl(DPAA_IOCTL_PORTAL_MAP)");
+		DPAA_BUS_ERR("Failed ioctl DPAA_IOCTL_PORTAL_MAP: %s", strerror(errno));
 		return ret;
 	}
 	return 0;
@@ -157,7 +157,7 @@ int process_portal_unmap(struct dpaa_portal_map *map)
 
 	ret = ioctl(fd, DPAA_IOCTL_PORTAL_UNMAP, map);
 	if (ret) {
-		perror("ioctl(DPAA_IOCTL_PORTAL_UNMAP)");
+		DPAA_BUS_ERR("Failed ioctl DPAA_IOCTL_PORTAL_UNMAP: %s", strerror(errno));
 		return ret;
 	}
 	return 0;
@@ -215,7 +215,7 @@ static int process_portal_allocate(struct dpaa_ioctl_raw_portal *portal)
 
 	ret = ioctl(fd, DPAA_IOCTL_ALLOC_RAW_PORTAL, portal);
 	if (ret) {
-		perror("ioctl(DPAA_IOCTL_ALLOC_RAW_PORTAL)");
+		DPAA_BUS_ERR("Failed ioctl DPAA_IOCTL_ALLOC_RAW_PORTAL: %s", strerror(errno));
 		return ret;
 	}
 	return 0;
@@ -230,7 +230,7 @@ static int process_portal_free(struct dpaa_ioctl_raw_portal *portal)
 
 	ret = ioctl(fd, DPAA_IOCTL_FREE_RAW_PORTAL, portal);
 	if (ret) {
-		perror("ioctl(DPAA_IOCTL_FREE_RAW_PORTAL)");
+		DPAA_BUS_ERR("Failed ioctl DPAA_IOCTL_FREE_RAW_PORTAL: %s", strerror(errno));
 		return ret;
 	}
 	return 0;
-- 
2.51.0


  parent reply	other threads:[~2025-12-28 20:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-28 20:10 [PATCH 0/4] Avoid using perror Stephen Hemminger
2025-12-28 20:10 ` [PATCH 1/4] checkpatches: warn if perror is used Stephen Hemminger
2025-12-28 20:10 ` Stephen Hemminger [this message]
2025-12-28 20:10 ` [PATCH 3/4] telemetry: replace perror with log Stephen Hemminger
2025-12-28 20:10 ` [PATCH 4/4] common/dpaax: replace use of " Stephen Hemminger

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=20251228201649.555898-3-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=sachin.saxena@nxp.com \
    /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;
as well as URLs for NNTP newsgroup(s).