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

Ville Syrjala ville.syrjala at linux.intel.com
Fri Jun 15 17:07:34 UTC 2018


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

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 <maarten.lankhorst at linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/drm_atomic_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 232fa11a5e31..2356ea498210 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -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);
 	}
 
 	/*
-- 
2.16.4



More information about the dri-devel mailing list