Re: [PATCH 5/6] mmc: sdhci-of-k1: use str_fail_pass() helper

From: Adrian Hunter

Date: Mon Aug 24 2026 - 03:43:00 EST


On 20/08/2026 09:11, Dmitry Antipov wrote:
> In 'spacemit_sdhci_execute_tuning()', prefer 'str_fail_pass()'
> choice helper over hardcoded strings.
>
> Signed-off-by: Dmitry Antipov <dmantipov@xxxxxxxxx>

I would say it is not worth people's time, but the logic is not broken, so:

Reviewed-by: Adrian Hunter <adrian.hunter@xxxxxxxxx>

> ---
> drivers/mmc/host/sdhci-of-k1.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-k1.c b/drivers/mmc/host/sdhci-of-k1.c
> index 37b0911e7cf2..80986c64eb83 100644
> --- a/drivers/mmc/host/sdhci-of-k1.c
> +++ b/drivers/mmc/host/sdhci-of-k1.c
> @@ -18,6 +18,7 @@
> #include <linux/reset.h>
> #include <linux/pinctrl/consumer.h>
> #include <linux/platform_device.h>
> +#include <linux/string_choices.h>
>
> #include "sdhci.h"
> #include "sdhci-pltfm.h"
> @@ -293,7 +294,7 @@ static int spacemit_sdhci_execute_tuning(struct sdhci_host *host, u32 opcode)
> ret = mmc_send_tuning(host->mmc, opcode, NULL);
>
> dev_dbg(mmc_dev(host->mmc), "RX delay %d: %s\n",
> - i, ret == 0 ? "pass" : "fail");
> + i, str_fail_pass(ret));
>
> if (ret == 0) {
> /* Test passed - extend current window */