Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mmc: rename mmc_can_ext_csd() to mmc_card_can_ext_csd()

mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'card'. Also, convert to
proper bool type while we are here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-4-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Wolfram Sang and committed by
Ulf Hansson
ceb5d3ac 5513d9be

+7 -7
+4 -4
drivers/mmc/core/mmc.c
··· 680 680 u8 *ext_csd; 681 681 int err; 682 682 683 - if (!mmc_can_ext_csd(card)) 683 + if (!mmc_card_can_ext_csd(card)) 684 684 return 0; 685 685 686 686 err = mmc_get_ext_csd(card, &ext_csd); ··· 959 959 int err, ddr; 960 960 961 961 /* Power class selection is supported for versions >= 4.0 */ 962 - if (!mmc_can_ext_csd(card)) 962 + if (!mmc_card_can_ext_csd(card)) 963 963 return 0; 964 964 965 965 bus_width = host->ios.bus_width; ··· 1022 1022 unsigned idx, bus_width = 0; 1023 1023 int err = 0; 1024 1024 1025 - if (!mmc_can_ext_csd(card) || 1025 + if (!mmc_card_can_ext_csd(card) || 1026 1026 !(host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA))) 1027 1027 return 0; 1028 1028 ··· 1543 1543 { 1544 1544 int err = 0; 1545 1545 1546 - if (!mmc_can_ext_csd(card)) 1546 + if (!mmc_card_can_ext_csd(card)) 1547 1547 goto bus_speed; 1548 1548 1549 1549 if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS400ES) {
+2 -2
drivers/mmc/core/mmc_ops.c
··· 383 383 if (!card || !new_ext_csd) 384 384 return -EINVAL; 385 385 386 - if (!mmc_can_ext_csd(card)) 386 + if (!mmc_card_can_ext_csd(card)) 387 387 return -EOPNOTSUPP; 388 388 389 389 /* ··· 944 944 return err; 945 945 } 946 946 947 - int mmc_can_ext_csd(struct mmc_card *card) 947 + bool mmc_card_can_ext_csd(struct mmc_card *card) 948 948 { 949 949 return (card && card->csd.mmca_vsn > CSD_SPEC_VER_3); 950 950 }
+1 -1
drivers/mmc/core/mmc_ops.h
··· 37 37 int mmc_spi_read_ocr(struct mmc_host *host, int highcap, u32 *ocrp); 38 38 int mmc_spi_set_crc(struct mmc_host *host, int use_crc); 39 39 int mmc_bus_test(struct mmc_card *card, u8 bus_width); 40 - int mmc_can_ext_csd(struct mmc_card *card); 40 + bool mmc_card_can_ext_csd(struct mmc_card *card); 41 41 int mmc_switch_status(struct mmc_card *card, bool crc_err_fatal); 42 42 bool mmc_prepare_busy_cmd(struct mmc_host *host, struct mmc_command *cmd, 43 43 unsigned int timeout_ms);