lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPDyKFrkjuwU5b2-26LLWJ9gWduvXa9SOZ5j1+ndk1n5grXHVA@mail.gmail.com>
Date: Thu, 3 Jul 2025 12:38:58 +0200
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Li Dong <lidong@...o.com>
Cc: Conor Dooley <conor.dooley@...rochip.com>, 
	Bartosz Golaszewski <bartosz.golaszewski@...aro.org>, Al Viro <viro@...iv.linux.org.uk>, 
	"open list:MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND..." <linux-mmc@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>, 
	opensource.kernel@...o.com, luhongfei@...o.com
Subject: Re: [PATCH v1] mmc: Convert ternary operator to str_write_read() helper

On Fri, 20 Jun 2025 at 05:30, Li Dong <lidong@...o.com> wrote:
>
> Replace direct ternary condition check with existing helper function
> str_write_read() to improve code readability and maintain consistency.

The below tells me there are more cases than mmc_spi. Please re-spin
and take care of all in one patch for the mmc subsystem.

git grep "\"write\"" drivers/mmc

Kind regards
Uffe

>
> Signed-off-by: Li Dong <lidong@...o.com>
> ---
>  drivers/mmc/host/mmc_spi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
> index 47443fb5eb33..0a1098140dc0 100644
> --- a/drivers/mmc/host/mmc_spi.c
> +++ b/drivers/mmc/host/mmc_spi.c
> @@ -27,6 +27,7 @@
>  #include <linux/spi/mmc_spi.h>
>
>  #include <linux/unaligned.h>
> +#include <linux/string_choices.h>
>
>
>  /* NOTES:
> @@ -774,7 +775,7 @@ mmc_spi_data_do(struct mmc_spi_host *host, struct mmc_command *cmd,
>         unsigned                n_sg;
>         bool                    multiple = (data->blocks > 1);
>         bool                    write = (data->flags & MMC_DATA_WRITE);
> -       const char              *write_or_read = write ? "write" : "read";
> +       const char              *write_or_read = str_write_read(write);
>         u32                     clock_rate;
>         unsigned long           timeout;
>
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ