Skip to content

Commit 675b8e3

Browse files
krzkbroonie
authored andcommitted
spi: amd: fix Wvoid-pointer-to-enum-cast warning
'version' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: spi-amd.c:401:21: error: cast to smaller integer type 'enum amd_spi_versions' 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 94d6cf7 commit 675b8e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi-amd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ static int amd_spi_probe(struct platform_device *pdev)
398398

399399
dev_dbg(dev, "io_remap_address: %p\n", amd_spi->io_remap_addr);
400400

401-
amd_spi->version = (enum amd_spi_versions) device_get_match_data(dev);
401+
amd_spi->version = (uintptr_t) device_get_match_data(dev);
402402

403403
/* Initialize the spi_controller fields */
404404
host->bus_num = 0;

0 commit comments

Comments
 (0)