Skip to content

Commit e249e58

Browse files
Yumeng Fangstorulf
authored andcommitted
mmc: bcm2835: Use str_read_write() helper
Remove hard-coded strings by using the str_read_write() helper. Signed-off-by: Yumeng Fang <fang.yumeng@zte.com.cn> Link: https://lore.kernel.org/r/20250515204201502Kzmj4I6k5Fv2FjqyEjF6n@zte.com.cn Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 676a838 commit e249e58

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/mmc/host/bcm2835.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include <linux/scatterlist.h>
4545
#include <linux/time.h>
4646
#include <linux/workqueue.h>
47+
#include <linux/string_choices.h>
4748

4849
#include <linux/mmc/host.h>
4950
#include <linux/mmc/mmc.h>
@@ -391,8 +392,7 @@ static void bcm2835_transfer_block_pio(struct bcm2835_host *host, bool is_read)
391392

392393
if (time_after(jiffies, wait_max)) {
393394
dev_err(dev, "PIO %s timeout - EDM %08x\n",
394-
is_read ? "read" : "write",
395-
edm);
395+
str_read_write(is_read), edm);
396396
hsts = SDHSTS_REW_TIME_OUT;
397397
break;
398398
}
@@ -435,12 +435,12 @@ static void bcm2835_transfer_pio(struct bcm2835_host *host)
435435
SDHSTS_CRC7_ERROR |
436436
SDHSTS_FIFO_ERROR)) {
437437
dev_err(dev, "%s transfer error - HSTS %08x\n",
438-
is_read ? "read" : "write", sdhsts);
438+
str_read_write(is_read), sdhsts);
439439
host->data->error = -EILSEQ;
440440
} else if ((sdhsts & (SDHSTS_CMD_TIME_OUT |
441441
SDHSTS_REW_TIME_OUT))) {
442442
dev_err(dev, "%s timeout error - HSTS %08x\n",
443-
is_read ? "read" : "write", sdhsts);
443+
str_read_write(is_read), sdhsts);
444444
host->data->error = -ETIMEDOUT;
445445
}
446446
}

0 commit comments

Comments
 (0)