dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] amd/display/dc:remove repeating expression
@ 2023-06-14  3:49 Wang Ming
  2023-06-14  5:29 ` Ammar Faizi
  0 siblings, 1 reply; 3+ messages in thread
From: Wang Ming @ 2023-06-14  3:49 UTC (permalink / raw)
  To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
	Christian König, Pan, Xinhui, David Airlie, Daniel Vetter,
	Stephen Rothwell, Wang Ming, amd-gfx, dri-devel, linux-kernel
  Cc: opensource.kernel

Identify issues that arise by using the tests/doubletest.cocci
semantic patch.Need to remove duplicate expression in if statement.

Signed-off-by: Wang Ming <machel@vivo.com>
---
 drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
index 0cc853964..b419a04ef 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
@@ -1610,7 +1610,7 @@ static int source_format_to_bpp (enum source_format_class SourcePixelFormat)
 {
        if (SourcePixelFormat == dm_444_64)
                return 8;
-       else if (SourcePixelFormat == dm_444_16 || SourcePixelFormat == dm_444_16)
+       else if (SourcePixelFormat == dm_444_16)
                return 2;
        else if (SourcePixelFormat == dm_444_8)
                return 1;
--
2.25.1


________________________________
本邮件及其附件内容可能含有机密和/或隐私信息,仅供指定个人或机构使用。若您非发件人指定收件人或其代理人,请勿使用、传播、复制或存储此邮件之任何内容或其附件。如您误收本邮件,请即以回复或电话方式通知发件人,并将原始邮件、附件及其所有复本删除。谢谢。
The contents of this message and any attachments may contain confidential and/or privileged information and are intended exclusively for the addressee(s). If you are not the intended recipient of this message or their agent, please note that any use, dissemination, copying, or storage of this message or its attachments is not allowed. If you receive this message in error, please notify the sender by reply the message or phone and delete this message, any attachments and any copies immediately.
Thank you

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-15 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14  3:49 [PATCH] amd/display/dc:remove repeating expression Wang Ming
2023-06-14  5:29 ` Ammar Faizi
2023-06-15 17:12   ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).