diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2021-05-04 21:55:10 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2021-05-27 09:42:22 +0200 |
commit | 83415669d8d830034c96e1de8ffb09b153a53504 (patch) | |
tree | 96140d56e7056173501f269306a8f35401f8fa49 /drivers/net/can/spi/hi311x.c | |
parent | can: softing: Remove redundant variable ptr (diff) | |
download | linux-83415669d8d830034c96e1de8ffb09b153a53504.tar.xz linux-83415669d8d830034c96e1de8ffb09b153a53504.zip |
can: hi311x: hi3110_can_probe(): silence clang warning
This patch silences the following clang warning:
| drivers/net/can/spi/hi311x.c:874:17: warning: cast to smaller integer type
| 'enum hi3110_model' from 'const void *' [-Wvoid-pointer-to-enum-cast]
| priv->model = (enum hi3110_model)of_id->data;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: 57e83fb9b746 ("can: hi311x: Add Holt HI-311x CAN driver")
Link: https://lore.kernel.org/r/20210504200520.1179635-3-mkl@pengutronix.de
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/spi/hi311x.c')
-rw-r--r-- | drivers/net/can/spi/hi311x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/spi/hi311x.c b/drivers/net/can/spi/hi311x.c index 6f5d6d04a8b9..dd17b8c53e1c 100644 --- a/drivers/net/can/spi/hi311x.c +++ b/drivers/net/can/spi/hi311x.c @@ -871,7 +871,7 @@ static int hi3110_can_probe(struct spi_device *spi) CAN_CTRLMODE_BERR_REPORTING; if (of_id) - priv->model = (enum hi3110_model)of_id->data; + priv->model = (enum hi3110_model)(uintptr_t)of_id->data; else priv->model = spi_get_device_id(spi)->driver_data; priv->net = net; |