Hi Krzysztof,
Le mercredi 24 décembre 2025 à 13:44 +0100, Krzysztof Kozlowski a
écrit :
"jz4740" is an enum, thus cast of pointer on 64-bit compile test with
clang W=1 causes:
jz4740_mmc.c:1055:18: error: cast to smaller integer type 'enum
jz4740_mmc_version' from 'const void *' [-Werror,-Wvoid-pointer-to-
enum-cast]
Signed-off-by: Krzysztof Kozlowski
[off-list ref]
Reviewed-by: Paul Cercueil <paul@crapouillou.net>
Cheers,
-Paul
quoted hunk ↗ jump to hunk
---
drivers/mmc/host/jz4740_mmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mmc/host/jz4740_mmc.c
b/drivers/mmc/host/jz4740_mmc.c
index 6a0d0250d47b..6a3c26b7c82d 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -1052,7 +1052,7 @@ static int jz4740_mmc_probe(struct
platform_device* pdev)
host = mmc_priv(mmc);
/* Default if no match is JZ4740 */
- host->version = (enum
jz4740_mmc_version)device_get_match_data(&pdev->dev);
+ host->version = (unsigned long)device_get_match_data(&pdev-
quoted
dev);
ret = mmc_of_parse(mmc);
if (ret)