BIT() takes a non-negative shift amount, but phy is of type enum phy, which can in theory be PHY_NONE (-1).
This is not a problem with the current implementation, because phy is always valid when this code is reached (Type-C encoders are rejected earlier), but it's more robust to store it as unsigned int so the shifts are always well-defined. Signed-off-by: Luca Coelho <[email protected]> --- drivers/gpu/drm/i915/display/intel_pmdemand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_pmdemand.c b/drivers/gpu/drm/i915/display/intel_pmdemand.c index 7819b724795b..d02ac2408e29 100644 --- a/drivers/gpu/drm/i915/display/intel_pmdemand.c +++ b/drivers/gpu/drm/i915/display/intel_pmdemand.c @@ -150,7 +150,7 @@ intel_pmdemand_update_phys_mask(struct intel_display *display, struct intel_pmdemand_state *pmdemand_state, bool set_bit) { - enum phy phy; + unsigned int phy; if (DISPLAY_VER(display) < 14) return; -- 2.53.0
