Skip to content

Commit fbbeae0

Browse files
krzkalexandrebelloni
authored andcommitted
rtc: rv8803: fix Wvoid-pointer-to-enum-cast warning
'type' is an enum, thus cast of pointer on 64-bit compile test with W=1 causes: rtc-rv8803.c:648:18: error: cast to smaller integer type 'enum rv8803_type' 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: Alexandre Belloni <[email protected]>
1 parent 737055e commit fbbeae0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/rtc/rtc-rv8803.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,8 +645,7 @@ static int rv8803_probe(struct i2c_client *client)
645645
mutex_init(&rv8803->flags_lock);
646646
rv8803->client = client;
647647
if (client->dev.of_node) {
648-
rv8803->type = (enum rv8803_type)
649-
of_device_get_match_data(&client->dev);
648+
rv8803->type = (uintptr_t)of_device_get_match_data(&client->dev);
650649
} else {
651650
const struct i2c_device_id *id = i2c_match_id(rv8803_id, client);
652651

0 commit comments

Comments
 (0)