Skip to contentSkip to conversation

drm/atomic-helper: Use bitwise or for filling a bitmask

PATCH In review Ville Syrjala 2 participants 2 messages Jun 15, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/atomic-helper: Use bitwise or for filling a bitmask

From: Ville Syrjälä <[email protected]>

Using += to set the bits in a mask looks funny. It works in this case because we never set the same bit twice. But let's switch to |= to make this look more regular.

Cc Maarten Lankhorst <[email protected]>
---
 drivers/gpu/drm/drm_atomic_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_atomic_helper.c +1 -1
index 232fa11a5e31..2356ea498210 100644
@@ -644,7 +644,7 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
 		if (ret)
 			return ret;
 
-		connectors_mask += BIT(i);
+		connectors_mask |= BIT(i);
 	}
 
 	/*
Signature · 6 lines
2.16.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel