Message ID | 20230810091247.70149-2-krzysztof.kozlowski@linaro.org |
---|---|
State | Accepted |
Commit | 94d6cf7e72a3ef90d7e16d770c3dc1b9cd40d8dd |
Headers | show |
Series | [net-next,1/3] spi: sc18is602: fix Wvoid-pointer-to-enum-cast warning | expand |
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 1bab18a0f262..21f156587669 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1344,7 +1344,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev) match = device_get_match_data(dev); if (match) - type = (enum pxa_ssp_type)match; + type = (uintptr_t)match; else if (is_lpss_priv) { u32 value;
'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: spi-pxa2xx.c:1347:10: error: cast to smaller integer type 'enum pxa_ssp_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- drivers/spi/spi-pxa2xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)