Skip to contentSkip to conversation

drm/amd/display: Simplify the calculation of variables

PATCH New Jiapeng Chong 1 participant 1 message Dec 1, 2023

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

PATCH 1/1 drm/amd/display: Simplify the calculation of variables

./drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c:964:49-51: WARNING !A || A && B is equivalent to !A || B.

---
 drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.c +1 -1
index fa8fe5bf7e57..519db4931b8d 100644
@@ -961,7 +961,7 @@ static bool get_plane_id(struct dml2_context *dml2, const struct dc_state *conte
 		if (context->streams[i]->stream_id == stream_id) {
 			for (j = 0; j < context->stream_status[i].plane_count; j++) {
 				if (context->stream_status[i].plane_states[j] == plane &&
-					(!is_plane_duplicate || (is_plane_duplicate && (j == plane_index)))) {
+				    (!is_plane_duplicate || (j == plane_index))) {
 					*plane_id = (i << 16) | j;
 					return true;
 				}
Signature · 1 line
2.20.1.7.g153144c