All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eddie James <eajames@linux.ibm.com>
To: openbmc@lists.ozlabs.org
Cc: Eddie James <eajames@linux.ibm.com>, joel@jms.id.au
Subject: [PATCH linux dev-5.15 2/2] spi: core: Display return code when failing to transfer message
Date: Wed, 25 May 2022 12:02:40 -0500	[thread overview]
Message-ID: <20220525170240.33918-3-eajames@linux.ibm.com> (raw)
In-Reply-To: <20220525170240.33918-1-eajames@linux.ibm.com>

All the other calls to the controller driver display the error
return code. The return code is helpful to understand what went
wrong, so include it when failing to transfer one message.

Signed-off-by: Eddie James <eajames@linux.ibm.com>
---
 drivers/spi/spi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index d0bbf8f9414d..9bfaa6352b73 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1616,7 +1616,8 @@ static void __spi_pump_messages(struct spi_controller *ctlr, bool in_kthread)
 	ret = ctlr->transfer_one_message(ctlr, msg);
 	if (ret) {
 		dev_err(&ctlr->dev,
-			"failed to transfer one message from queue\n");
+			"failed to transfer one message from queue: %d\n",
+			ret);
 		goto out;
 	}
 
-- 
2.27.0


  parent reply	other threads:[~2022-05-25 17:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 17:02 [PATCH linux dev-5.15 0/2] spi: fsi: Fix spurious timeout Eddie James
2022-05-25 17:02 ` [PATCH linux dev-5.15 1/2] " Eddie James
2022-05-25 17:02 ` Eddie James [this message]
2022-05-27  7:24 ` [PATCH linux dev-5.15 0/2] " Joel Stanley

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=20220525170240.33918-3-eajames@linux.ibm.com \
    --to=eajames@linux.ibm.com \
    --cc=joel@jms.id.au \
    --cc=openbmc@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.