Skip to content

Commit 04e1ef8

Browse files
Jiapeng Chongalexdeucher
authored andcommitted
drm/amd/display: Simplify the calculation of variables
./drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c:236:49-51: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8169 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 3d1554d commit 04e1ef8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/display/dc/dml2/dml2_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static bool get_plane_id(struct dml2_context *dml2, const struct dc_state *state
234234
if (state->streams[i]->stream_id == stream_id) {
235235
for (j = 0; j < state->stream_status[i].plane_count; j++) {
236236
if (state->stream_status[i].plane_states[j] == plane &&
237-
(!is_plane_duplicate || (is_plane_duplicate && (j == plane_index)))) {
237+
(!is_plane_duplicate || (j == plane_index))) {
238238
*plane_id = (i << 16) | j;
239239
return true;
240240
}

0 commit comments

Comments
 (0)