Commit 675b8e35 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Mark Brown

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: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810091247.70149-3-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 94d6cf7e
......@@ -398,7 +398,7 @@ static int amd_spi_probe(struct platform_device *pdev)
dev_dbg(dev, "io_remap_address: %p\n", amd_spi->io_remap_addr);
amd_spi->version = (enum amd_spi_versions) device_get_match_data(dev);
amd_spi->version = (uintptr_t) device_get_match_data(dev);
/* Initialize the spi_controller fields */
host->bus_num = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment