Message ID | 20230810091247.70149-1-krzysztof.kozlowski@linaro.org |
---|---|
State | Accepted |
Commit | 0f9440a646fd1245a9206f171a4de25e6b092d42 |
Headers | show |
Series | [net-next,1/3] spi: sc18is602: fix Wvoid-pointer-to-enum-cast warning | expand |
On Thu, 10 Aug 2023 11:12:45 +0200, Krzysztof Kozlowski wrote: > 'id' is an enum, thus cast of pointer on 64-bit compile test with W=1 > causes: > > spi-sc18is602.c:269:12: error: cast to smaller integer type 'enum chips' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next Thanks! [1/3] spi: sc18is602: fix Wvoid-pointer-to-enum-cast warning commit: 0f9440a646fd1245a9206f171a4de25e6b092d42 [2/3] spi: pxa2xx: fix Wvoid-pointer-to-enum-cast warning commit: 94d6cf7e72a3ef90d7e16d770c3dc1b9cd40d8dd [3/3] spi: amd: fix Wvoid-pointer-to-enum-cast warning commit: 675b8e35b5cbf4aaa1339079f44b88b9f1bb2f1b All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/drivers/spi/spi-sc18is602.c b/drivers/spi/spi-sc18is602.c index c67a24daaaf9..9f98bf350697 100644 --- a/drivers/spi/spi-sc18is602.c +++ b/drivers/spi/spi-sc18is602.c @@ -266,7 +266,7 @@ static int sc18is602_probe(struct i2c_client *client) hw->ctrl = 0xff; if (client->dev.of_node) - hw->id = (enum chips)of_device_get_match_data(&client->dev); + hw->id = (uintptr_t)of_device_get_match_data(&client->dev); else hw->id = id->driver_data;
'id' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: spi-sc18is602.c:269:12: error: cast to smaller integer type 'enum chips' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- drivers/spi/spi-sc18is602.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)