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_sanitize() to mmc_card_can_sanitize()

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-7-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Wolfram Sang and committed by
Ulf Hansson
2abda048 07dd2b32

+6 -6
+4 -4
drivers/mmc/core/core.c
··· 1862 1862 } 1863 1863 EXPORT_SYMBOL(mmc_card_can_discard); 1864 1864 1865 - int mmc_can_sanitize(struct mmc_card *card) 1865 + bool mmc_card_can_sanitize(struct mmc_card *card) 1866 1866 { 1867 1867 if (!mmc_can_trim(card) && !mmc_card_can_erase(card)) 1868 - return 0; 1868 + return false; 1869 1869 if (card->ext_csd.sec_feature_support & EXT_CSD_SEC_SANITIZE) 1870 - return 1; 1871 - return 0; 1870 + return true; 1871 + return false; 1872 1872 } 1873 1873 1874 1874 int mmc_can_secure_erase_trim(struct mmc_card *card)
+1 -1
drivers/mmc/core/core.h
··· 121 121 bool mmc_card_can_erase(struct mmc_card *card); 122 122 int mmc_can_trim(struct mmc_card *card); 123 123 bool mmc_card_can_discard(struct mmc_card *card); 124 - int mmc_can_sanitize(struct mmc_card *card); 124 + bool mmc_card_can_sanitize(struct mmc_card *card); 125 125 int mmc_can_secure_erase_trim(struct mmc_card *card); 126 126 int mmc_erase_group_aligned(struct mmc_card *card, sector_t from, unsigned int nr); 127 127 unsigned int mmc_calc_max_discard(struct mmc_card *card);
+1 -1
drivers/mmc/core/mmc_ops.c
··· 1046 1046 struct mmc_host *host = card->host; 1047 1047 int err; 1048 1048 1049 - if (!mmc_can_sanitize(card)) { 1049 + if (!mmc_card_can_sanitize(card)) { 1050 1050 pr_warn("%s: Sanitize not supported\n", mmc_hostname(host)); 1051 1051 return -EOPNOTSUPP; 1052 1052 }