DPDK patches and discussions
 help / color / mirror / Atom feed
From: Xingui Yang <yangxingui@huawei.com>
To: <dev@dpdk.org>
Cc: <chenbox@nvidia.com>, <nipun.gupta@amd.com>,
	<stephen@networkplumber.org>,  <huangdengdui@huawei.com>
Subject: [PATCH] bus/pci: print the return value when probe failed
Date: Thu, 28 Aug 2025 11:00:27 +0800	[thread overview]
Message-ID: <20250828030027.1865866-1-yangxingui@huawei.com> (raw)

The return value is not printed when probe failed, and it is not
convenient for locating the problem, so add it.

Signed-off-by: Xingui Yang <yangxingui@huawei.com>
---
 drivers/bus/pci/pci_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index c88634f790..adef4c16e1 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -410,9 +410,9 @@ pci_probe(void)
 		ret = pci_probe_all_drivers(dev);
 		if (ret < 0) {
 			if (ret != -EEXIST) {
-				PCI_LOG(ERR, "Requested device " PCI_PRI_FMT " cannot be used",
-					dev->addr.domain, dev->addr.bus,
-					dev->addr.devid, dev->addr.function);
+				PCI_LOG(ERR, "Requested device " PCI_PRI_FMT " cannot be used, ret = %d",
+					dev->addr.domain, dev->addr.bus, dev->addr.devid,
+					dev->addr.function, ret);
 				rte_errno = errno;
 				failed++;
 			}
-- 
2.33.0


                 reply	other threads:[~2025-08-28  3:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250828030027.1865866-1-yangxingui@huawei.com \
    --to=yangxingui@huawei.com \
    --cc=chenbox@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=huangdengdui@huawei.com \
    --cc=nipun.gupta@amd.com \
    --cc=stephen@networkplumber.org \
    /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).