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:
Sean Chang 2026-08-19 23:12:16 +08:00 • committed by Luca Ceresoli
commit cb6a133bc7