Skip to content

Commit 03b31a0

Browse files
Wolfram Sangstorulf
authored andcommitted
mmc: rename mmc_host_cmd23() to mmc_host_can_cmd23()
It is not obvious that this functions checks capabilities. Rename it to include '_can' like other capability helpers. Signed-off-by: Wolfram Sang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 5846efa commit 03b31a0

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

drivers/mmc/core/block.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2618,7 +2618,7 @@ static struct mmc_blk_data *mmc_blk_alloc_req(struct mmc_card *card,
26182618
*/
26192619
md->read_only = mmc_blk_readonly(card);
26202620

2621-
if (mmc_host_cmd23(card->host)) {
2621+
if (mmc_host_can_cmd23(card->host)) {
26222622
if ((mmc_card_mmc(card) &&
26232623
card->csd.mmca_vsn >= CSD_SPEC_VER_3) ||
26242624
(mmc_card_sd(card) && !mmc_card_ult_capacity(card) &&

drivers/mmc/core/host.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static inline void mmc_retune_recheck(struct mmc_host *host)
3939
host->retune_now = 1;
4040
}
4141

42-
static inline int mmc_host_cmd23(struct mmc_host *host)
42+
static inline int mmc_host_can_cmd23(struct mmc_host *host)
4343
{
4444
return host->caps & MMC_CAP_CMD23;
4545
}

drivers/mmc/core/mmc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
578578
* RPMB regions are defined in multiples of 128K.
579579
*/
580580
card->ext_csd.raw_rpmb_size_mult = ext_csd[EXT_CSD_RPMB_MULT];
581-
if (ext_csd[EXT_CSD_RPMB_MULT] && mmc_host_cmd23(card->host)) {
581+
if (ext_csd[EXT_CSD_RPMB_MULT] && mmc_host_can_cmd23(card->host)) {
582582
mmc_part_add(card, ext_csd[EXT_CSD_RPMB_MULT] << 17,
583583
EXT_CSD_PART_CONFIG_ACC_RPMB,
584584
"rpmb", 0, false,

drivers/mmc/core/mmc_test.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static void mmc_test_prepare_sbc(struct mmc_test_card *test,
191191
{
192192
struct mmc_card *card = test->card;
193193

194-
if (!mrq->sbc || !mmc_host_cmd23(card->host) ||
194+
if (!mrq->sbc || !mmc_host_can_cmd23(card->host) ||
195195
!mmc_test_card_cmd23(card) || !mmc_op_multi(mrq->cmd->opcode) ||
196196
(card->quirks & MMC_QUIRK_BLK_NO_CMD23)) {
197197
mrq->sbc = NULL;
@@ -2390,7 +2390,7 @@ static int mmc_test_ongoing_transfer(struct mmc_test_card *test,
23902390
512, write);
23912391

23922392
if (use_sbc && t->blocks > 1 && !mrq->sbc) {
2393-
ret = mmc_host_cmd23(host) ?
2393+
ret = mmc_host_can_cmd23(host) ?
23942394
RESULT_UNSUP_CARD :
23952395
RESULT_UNSUP_HOST;
23962396
goto out_free;

0 commit comments

Comments
 (0)