* [PATCH] crypto: exynos - fix Wvoid-pointer-to-enum-cast warning
@ 2023-08-10 10:00 Krzysztof Kozlowski
2023-08-18 10:24 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 10:00 UTC (permalink / raw)
To: Krzysztof Kozlowski, Herbert Xu, David S. Miller, Alim Akhtar,
linux-crypto, linux-samsung-soc, linux-arm-kernel, linux-kernel
Cc: Andi Shyti
'type' is an enum, thus cast of pointer on 64-bit compile test with W=1
causes:
exynos-rng.c:280:14: error: cast to smaller integer type 'enum exynos_prng_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
drivers/crypto/exynos-rng.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/exynos-rng.c b/drivers/crypto/exynos-rng.c
index cbd8ca6e52ee..b1df66be9adc 100644
--- a/drivers/crypto/exynos-rng.c
+++ b/drivers/crypto/exynos-rng.c
@@ -277,7 +277,7 @@ static int exynos_rng_probe(struct platform_device *pdev)
if (!rng)
return -ENOMEM;
- rng->type = (enum exynos_prng_type)of_device_get_match_data(&pdev->dev);
+ rng->type = (uintptr_t)of_device_get_match_data(&pdev->dev);
mutex_init(&rng->lock);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: exynos - fix Wvoid-pointer-to-enum-cast warning
2023-08-10 10:00 [PATCH] crypto: exynos - fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
@ 2023-08-18 10:24 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2023-08-18 10:24 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: David S. Miller, Alim Akhtar, linux-crypto, linux-samsung-soc,
linux-arm-kernel, linux-kernel, Andi Shyti
On Thu, Aug 10, 2023 at 12:00:23PM +0200, Krzysztof Kozlowski wrote:
> 'type' is an enum, thus cast of pointer on 64-bit compile test with W=1
> causes:
>
> exynos-rng.c:280:14: error: cast to smaller integer type 'enum exynos_prng_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> drivers/crypto/exynos-rng.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-18 10:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-10 10:00 [PATCH] crypto: exynos - fix Wvoid-pointer-to-enum-cast warning Krzysztof Kozlowski
2023-08-18 10:24 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).