提交 2101bfca 编写于 作者: T Tomi Valkeinen 提交者: Daniel Vetter

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: fb43aa0a ("drm: bridge: Add support for Cadence MHDP8546 DPI/DP bridge")
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: NSwapnil Jakhade <sjakhade@cadence.com>
Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200929091918.24813-1-tomi.valkeinen@ti.com
上级 06c14f5c
......@@ -748,7 +748,7 @@ static int cdns_mhdp_fw_activate(const struct firmware *fw,
* bridge should already be detached.
*/
if (mhdp->bridge_attached)
writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
writel(~(u32)CDNS_APB_INT_MASK_SW_EVENT_INT,
mhdp->regs + CDNS_APB_INT_MASK);
spin_unlock(&mhdp->start_lock);
......@@ -1689,7 +1689,7 @@ static int cdns_mhdp_attach(struct drm_bridge *bridge,
/* Enable SW event interrupts */
if (hw_ready)
writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
writel(~(u32)CDNS_APB_INT_MASK_SW_EVENT_INT,
mhdp->regs + CDNS_APB_INT_MASK);
return 0;
......@@ -2122,7 +2122,7 @@ static void cdns_mhdp_bridge_hpd_enable(struct drm_bridge *bridge)
/* Enable SW event interrupts */
if (mhdp->bridge_attached)
writel(~CDNS_APB_INT_MASK_SW_EVENT_INT,
writel(~(u32)CDNS_APB_INT_MASK_SW_EVENT_INT,
mhdp->regs + CDNS_APB_INT_MASK);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册