linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: block: Suppress empty whitespaces in prints
@ 2023-05-09 19:44 Florian Fainelli
  2023-05-24 13:10 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2023-05-09 19:44 UTC (permalink / raw)
  To: linux-kernel
  Cc: Florian Fainelli, Ulf Hansson, Adrian Hunter,
	Christian Löhle, Avri Altman, Jens Axboe, Ming Lei,
	Bean Huo, Seunghui Lee, Vincent Whitchurch,
	open list:MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND...

If the device is not read-only, then we will be printing an empty
whitespace before the newline, fix that.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/mmc/core/block.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index 00c33edb9fb9..761876e5012a 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -2502,9 +2502,9 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
 
 	string_get_size((u64)size, 512, STRING_UNITS_2,
 			cap_str, sizeof(cap_str));
-	pr_info("%s: %s %s %s %s\n",
+	pr_info("%s: %s %s %s%s\n",
 		md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
-		cap_str, md->read_only ? "(ro)" : "");
+		cap_str, md->read_only ? " (ro)" : "");
 
 	/* used in ->open, must be set before add_disk: */
 	if (area_type == MMC_BLK_DATA_AREA_MAIN)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mmc: block: Suppress empty whitespaces in prints
  2023-05-09 19:44 [PATCH] mmc: block: Suppress empty whitespaces in prints Florian Fainelli
@ 2023-05-24 13:10 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2023-05-24 13:10 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-kernel, Adrian Hunter, Christian Löhle, Avri Altman,
	Jens Axboe, Ming Lei, Bean Huo, Seunghui Lee, Vincent Whitchurch,
	open list:MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND...

On Tue, 9 May 2023 at 21:45, Florian Fainelli <f.fainelli@gmail.com> wrote:
>
> If the device is not read-only, then we will be printing an empty
> whitespace before the newline, fix that.
>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/core/block.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
> index 00c33edb9fb9..761876e5012a 100644
> --- a/drivers/mmc/core/block.c
> +++ b/drivers/mmc/core/block.c
> @@ -2502,9 +2502,9 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
>
>         string_get_size((u64)size, 512, STRING_UNITS_2,
>                         cap_str, sizeof(cap_str));
> -       pr_info("%s: %s %s %s %s\n",
> +       pr_info("%s: %s %s %s%s\n",
>                 md->disk->disk_name, mmc_card_id(card), mmc_card_name(card),
> -               cap_str, md->read_only ? "(ro)" : "");
> +               cap_str, md->read_only ? " (ro)" : "");
>
>         /* used in ->open, must be set before add_disk: */
>         if (area_type == MMC_BLK_DATA_AREA_MAIN)
> --
> 2.34.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-24 13:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-09 19:44 [PATCH] mmc: block: Suppress empty whitespaces in prints Florian Fainelli
2023-05-24 13:10 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).