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_reset() to mmc_card_can_reset()

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. Conversion was simplified by
inverting the logic.

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

authored by

Wolfram Sang and committed by
Ulf Hansson
07dd2b32 d872c267

+3 -5
+3 -5
drivers/mmc/core/mmc.c
··· 2269 2269 return 0; 2270 2270 } 2271 2271 2272 - static int mmc_can_reset(struct mmc_card *card) 2272 + static bool mmc_card_can_reset(struct mmc_card *card) 2273 2273 { 2274 2274 u8 rst_n_function; 2275 2275 2276 2276 rst_n_function = card->ext_csd.rst_n_function; 2277 - if ((rst_n_function & EXT_CSD_RST_N_EN_MASK) != EXT_CSD_RST_N_ENABLED) 2278 - return 0; 2279 - return 1; 2277 + return ((rst_n_function & EXT_CSD_RST_N_EN_MASK) == EXT_CSD_RST_N_ENABLED); 2280 2278 } 2281 2279 2282 2280 static int _mmc_hw_reset(struct mmc_host *host) ··· 2288 2290 _mmc_flush_cache(host); 2289 2291 2290 2292 if ((host->caps & MMC_CAP_HW_RESET) && host->ops->card_hw_reset && 2291 - mmc_can_reset(card)) { 2293 + mmc_card_can_reset(card)) { 2292 2294 /* If the card accept RST_n signal, send it. */ 2293 2295 mmc_set_clock(host, host->f_init); 2294 2296 host->ops->card_hw_reset(host);