Skip to content

Commit 2101bfc

Browse files
tombadanvet
authored andcommitted
drm: bridge: cdns-mhdp8546: fix compile warning
On x64 we get: drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c:751:10: warning: conversion from 'long unsigned int' to 'unsigned int' changes value from '18446744073709551613' to '4294967293' [-Woverflow] The registers are 32 bit, so fix by casting to u32. Fixes: fb43aa0 ("drm: bridge: Add support for Cadence MHDP8546 DPI/DP bridge") Signed-off-by: Tomi Valkeinen <[email protected]> Reported-by: Stephen Rothwell <[email protected]> Reviewed-by: Swapnil Jakhade <[email protected]> Acked-by: Laurent Pinchart <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 06c14f5 commit 2101bfc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ static int cdns_mhdp_fw_activate(const struct firmware *fw,
748748
* bridge should already be detached.
749749
*/
750750
if (mhdp->bridge_attached)
751-
writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
751+
writel(~(u32)CDNS_APB_INT_MASK_SW_EVENT_INT,
752752
mhdp->regs + CDNS_APB_INT_MASK);
753753

754754
spin_unlock(&mhdp->start_lock);
@@ -1689,7 +1689,7 @@ static int cdns_mhdp_attach(struct drm_bridge *bridge,
16891689

16901690
/* Enable SW event interrupts */
16911691
if (hw_ready)
1692-
writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
1692+
writel(~(u32)CDNS_APB_INT_MASK_SW_EVENT_INT,
16931693
mhdp->regs + CDNS_APB_INT_MASK);
16941694

16951695
return 0;
@@ -2122,7 +2122,7 @@ static void cdns_mhdp_bridge_hpd_enable(struct drm_bridge *bridge)
21222122

21232123
/* Enable SW event interrupts */
21242124
if (mhdp->bridge_attached)
2125-
writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
2125+
writel(~(u32)CDNS_APB_INT_MASK_SW_EVENT_INT,
21262126
mhdp->regs + CDNS_APB_INT_MASK);
21272127
}
21282128

0 commit comments

Comments
 (0)