Skip to content

Commit 94d6cf7

Browse files
krzkbroonie
authored andcommitted
spi: pxa2xx: fix Wvoid-pointer-to-enum-cast warning
'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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 0f9440a commit 94d6cf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi-pxa2xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
13441344

13451345
match = device_get_match_data(dev);
13461346
if (match)
1347-
type = (enum pxa_ssp_type)match;
1347+
type = (uintptr_t)match;
13481348
else if (is_lpss_priv) {
13491349
u32 value;
13501350

0 commit comments

Comments
 (0)