mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Cc: Sascha Hauer <sascha@saschahauer.de>
Subject: [PATCH 1/2] mci: sdhci: propagate tuning failures from sdhci_execute_tuning()
Date: Tue, 19 May 2026 16:15:00 +0200	[thread overview]
Message-ID: <20260519141502.1427529-1-s.hauer@pengutronix.de> (raw)

From: Sascha Hauer <sascha@saschahauer.de>

sdhci->tuning_err is set but never used. Drop it and return the tuning
error directly from sdhci_execute_tuning(). With this we can actually
return tuning errors instead of silently ignoring them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/mci/sdhci.c | 2 +-
 drivers/mci/sdhci.h | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mci/sdhci.c b/drivers/mci/sdhci.c
index f7172347e1..1b13df8583 100644
--- a/drivers/mci/sdhci.c
+++ b/drivers/mci/sdhci.c
@@ -353,7 +353,7 @@ int sdhci_execute_tuning(struct sdhci *sdhci, u32 opcode)
 
 	sdhci_start_tuning(sdhci);
 
-	sdhci->tuning_err = __sdhci_execute_tuning(sdhci, opcode);
+	err = __sdhci_execute_tuning(sdhci, opcode);
 
 	sdhci_end_tuning(sdhci);
 out:
diff --git a/drivers/mci/sdhci.h b/drivers/mci/sdhci.h
index 8d21febd7a..4a326f9d84 100644
--- a/drivers/mci/sdhci.h
+++ b/drivers/mci/sdhci.h
@@ -280,7 +280,6 @@ struct sdhci {
 
 	unsigned int		tuning_count;	/* Timer count for re-tuning */
 	unsigned int		tuning_mode;	/* Re-tuning mode supported by host */
-	unsigned int		tuning_err;	/* Error code for re-tuning */
 #define SDHCI_TUNING_MODE_1	0
 #define SDHCI_TUNING_MODE_2	1
 #define SDHCI_TUNING_MODE_3	2
-- 
2.47.3




             reply	other threads:[~2026-05-19 14:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-19 14:15 Sascha Hauer [this message]
2026-05-19 14:15 ` [PATCH 2/2] mci: sdhci: drop unused re-tuning timer plumbing Sascha Hauer
2026-05-19 14:26   ` Ahmad Fatoum
2026-05-19 14:25 ` [PATCH 1/2] mci: sdhci: propagate tuning failures from sdhci_execute_tuning() Ahmad Fatoum
2026-05-19 14:35 ` Sascha Hauer

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=20260519141502.1427529-1-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=sascha@saschahauer.de \
    /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