Skip to content

Commit 4ebbd46

Browse files
krzkalexandrebelloni
authored andcommitted
rtc: jz4740: 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-jz4740.c:352:14: error: cast to smaller integer type 'enum jz4740_rtc_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 fbbeae0 commit 4ebbd46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/rtc/rtc-jz4740.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ static int jz4740_rtc_probe(struct platform_device *pdev)
349349
if (!rtc)
350350
return -ENOMEM;
351351

352-
rtc->type = (enum jz4740_rtc_type)device_get_match_data(dev);
352+
rtc->type = (uintptr_t)device_get_match_data(dev);
353353

354354
irq = platform_get_irq(pdev, 0);
355355
if (irq < 0)

0 commit comments

Comments
 (0)