Message ID | 20230810095936.123432-1-krzysztof.kozlowski@linaro.org |
---|---|
State | New |
Headers | show |
Series | [1/2] Input: mms114 - fix Wvoid-pointer-to-enum-cast warning | expand |
diff --git a/drivers/input/touchscreen/mms114.c b/drivers/input/touchscreen/mms114.c index af233b6a16d9..d9beb15a3676 100644 --- a/drivers/input/touchscreen/mms114.c +++ b/drivers/input/touchscreen/mms114.c @@ -504,7 +504,7 @@ static int mms114_probe(struct i2c_client *client) if (!match_data) return -EINVAL; - data->type = (enum mms_type)match_data; + data->type = (uintptr_t)match_data; data->num_keycodes = device_property_count_u32(&client->dev, "linux,keycodes");
'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: drivers/input/touchscreen/mms114.c:507:15: error: cast to smaller integer type 'enum mms_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> --- drivers/input/touchscreen/mms114.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)