Skip to content

Commit 88a1981

Browse files
arndbbroonie
authored andcommitted
spi: qup: fix 64-bit build warning
On 64-bit systems, pointers are wider than 'int' variables, so we get a warning about a cast between them: drivers/spi/spi-qup.c:1060:23: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast] This changes the code to use the correct uintptr_t cast. Fixes: 4d02373 ("spi: qup: Fix QUP version identify method") Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 6f38f12 commit 88a1981

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi-qup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ static int spi_qup_probe(struct platform_device *pdev)
10571057
else if (!ret)
10581058
master->can_dma = spi_qup_can_dma;
10591059

1060-
controller->qup_v1 = (int)of_device_get_match_data(dev);
1060+
controller->qup_v1 = (uintptr_t)of_device_get_match_data(dev);
10611061

10621062
if (!controller->qup_v1)
10631063
master->set_cs = spi_qup_set_cs;

0 commit comments

Comments
 (0)