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

Adrian Hunter <[email protected]>
Newsgroups org.kernel.vger.linux-kernel
Organization Intel Finland Oy, Registered Address: c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo, Business Identity Code: 0357606 - 4, Domiciled in Helsinki
Message-ID <[email protected]>
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 <[email protected]>

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

Reviewed-by: Adrian Hunter <[email protected]>

> ---
>  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 */
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.