mmc: block: Suppress empty whitespaces in prints
PATCH 1/1 mmc: block: Suppress empty whitespaces in prints
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 <[email protected]>
--- drivers/mmc/core/block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mmc/core/block.c +2 -2
@@ -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 )
Signature · 1 line
2.34.1
Quoted 5 lines · Florian Fainelli
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 <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 23 lines
--- drivers/mmc/core/block.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/mmc/core/block.c +2
-3@@ -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