aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2025-04-01 11:58:42 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2025-05-14 16:59:17 +0200
commit2abda0485610a6a7849a13576c8c13c3ba903db1 (patch)
tree858553a6884853a5a4b399f648bf7f195ba157ef
parentmmc: rename mmc_can_reset() to mmc_card_can_reset() (diff)
downloadlinux-2abda0485610a6a7849a13576c8c13c3ba903db1.tar.gz
linux-2abda0485610a6a7849a13576c8c13c3ba903db1.zip
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>
-rw-r--r--drivers/mmc/core/core.c8
-rw-r--r--drivers/mmc/core/core.h2
-rw-r--r--drivers/mmc/core/mmc_ops.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index e7449d03f311..ff75336eb1ae 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1862,13 +1862,13 @@ bool mmc_card_can_discard(struct mmc_card *card)
}
EXPORT_SYMBOL(mmc_card_can_discard);
-int mmc_can_sanitize(struct mmc_card *card)
+bool mmc_card_can_sanitize(struct mmc_card *card)
{
if (!mmc_can_trim(card) && !mmc_card_can_erase(card))
- return 0;
+ return false;
if (card->ext_csd.sec_feature_support & EXT_CSD_SEC_SANITIZE)
- return 1;
- return 0;
+ return true;
+ return false;
}
int mmc_can_secure_erase_trim(struct mmc_card *card)
diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h
index 2e66d8321626..1f194665499d 100644
--- a/drivers/mmc/core/core.h
+++ b/drivers/mmc/core/core.h
@@ -121,7 +121,7 @@ int mmc_erase(struct mmc_card *card, sector_t from, unsigned int nr, unsigned in
bool mmc_card_can_erase(struct mmc_card *card);
int mmc_can_trim(struct mmc_card *card);
bool mmc_card_can_discard(struct mmc_card *card);
-int mmc_can_sanitize(struct mmc_card *card);
+bool mmc_card_can_sanitize(struct mmc_card *card);
int mmc_can_secure_erase_trim(struct mmc_card *card);
int mmc_erase_group_aligned(struct mmc_card *card, sector_t from, unsigned int nr);
unsigned int mmc_calc_max_discard(struct mmc_card *card);
diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c
index 638e87a861bc..66283825513c 100644
--- a/drivers/mmc/core/mmc_ops.c
+++ b/drivers/mmc/core/mmc_ops.c
@@ -1046,7 +1046,7 @@ int mmc_sanitize(struct mmc_card *card, unsigned int timeout_ms)
struct mmc_host *host = card->host;
int err;
- if (!mmc_can_sanitize(card)) {
+ if (!mmc_card_can_sanitize(card)) {
pr_warn("%s: Sanitize not supported\n", mmc_hostname(host));
return -EOPNOTSUPP;
}