mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm: bridge: dw_hdmi: Fix constant truncation warning on phy_mask
In dw_hdmi_probe(), casting the bitwise complement of (HDMI_PHY_HPD | HDMI_PHY_RX_SENSE) directly to u8 triggers a compiler warning (-Wconstant-conversion). Due to C integer promotion rules, the bitwise OR and bitwise NOT are evaluated as 32-bit signed integers, producing 0xFFFFFF0D before being cast down to u8. Fix this by explicitly masking the inverted 32-bit result with 0xFF to keep only the lower byte and prevent implicit upper-bit truncation. Signed-off-by: Sean Chang <seanwascoding@gmail.com> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Link: https://patch.msgid.link/20260819151216.56833-1-seanwascoding@gmail.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
This commit is contained in:
parent
23df2e995d
commit
cb6a133bc7
1 changed files with 1 additions and 1 deletions
Loading…
Add table
Add a link
Reference in a new issue