linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: "Florian Fainelli" <f.fainelli@gmail.com>,
	"Ulf Hansson" <ulf.hansson@linaro.org>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Christian Löhle" <CLoehle@hyperstone.com>,
	"Avri Altman" <avri.altman@wdc.com>,
	"Jens Axboe" <axboe@kernel.dk>, "Ming Lei" <ming.lei@redhat.com>,
	"Bean Huo" <beanhuo@micron.com>,
	"Seunghui Lee" <sh043.lee@samsung.com>,
	"Vincent Whitchurch" <vincent.whitchurch@axis.com>,
	linux-mmc@vger.kernel.org (open list:MULTIMEDIA CARD (MMC),
	SECURE DIGITAL (SD) AND...)
Subject: [PATCH] mmc: block: Suppress empty whitespaces in prints
Date: Tue,  9 May 2023 12:44:53 -0700	[thread overview]
Message-ID: <20230509194455.1791890-1-f.fainelli@gmail.com> (raw)

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


             reply	other threads:[~2023-05-09 19:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 19:44 Florian Fainelli [this message]
2023-05-24 13:10 ` [PATCH] mmc: block: Suppress empty whitespaces in prints Ulf Hansson

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=20230509194455.1791890-1-f.fainelli@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=CLoehle@hyperstone.com \
    --cc=adrian.hunter@intel.com \
    --cc=avri.altman@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=beanhuo@micron.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=sh043.lee@samsung.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.whitchurch@axis.com \
    /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;
as well as URLs for NNTP newsgroup(s).