From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> To: "alexander.deucher@amd.comalexander.deucher"@amd.com Cc: , Jiapeng Chong <jiapeng.chong@linux.alibaba.com>, Xinhui.Pan@amd.com, Abaci Robot <abaci@linux.alibaba.com>, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, ""@linux.ie, dri-devel@lists.freedesktop.org, christian.koenig@amd.com Subject: [PATCH] drm/amd/display: Remove redundant initialization of dpg_width Date: Fri, 14 Jan 2022 18:43:52 +0800 [thread overview] Message-ID: <20220114104352.6107-1-jiapeng.chong@linux.alibaba.com> (raw) dpg_width is being initialized to width but this is never read as dpg_width is overwritten later on. Remove the redundant initialization. Cleans up the following clang-analyzer warning: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:6020:8: warning: Value stored to 'dpg_width' during its initialization is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> --- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index 497470513e76..1f8831156bc4 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c @@ -6017,7 +6017,7 @@ static void set_crtc_test_pattern(struct dc_link *link, else if (link->dc->hwss.set_disp_pattern_generator) { struct pipe_ctx *odm_pipe; int opp_cnt = 1; - int dpg_width = width; + int dpg_width; for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe) opp_cnt++; -- 2.20.1.7.g153144c
WARNING: multiple messages have this Message-ID (diff)
From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> To: "alexander.deucher@amd.comalexander.deucher"@amd.com Cc: , Jiapeng Chong <jiapeng.chong@linux.alibaba.com>, Xinhui.Pan@amd.com, Abaci Robot <abaci@linux.alibaba.com>, linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, ""@linux.ie, dri-devel@lists.freedesktop.org, daniel@ffwll.ch, christian.koenig@amd.com Subject: [PATCH] drm/amd/display: Remove redundant initialization of dpg_width Date: Fri, 14 Jan 2022 18:43:52 +0800 [thread overview] Message-ID: <20220114104352.6107-1-jiapeng.chong@linux.alibaba.com> (raw) dpg_width is being initialized to width but this is never read as dpg_width is overwritten later on. Remove the redundant initialization. Cleans up the following clang-analyzer warning: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:6020:8: warning: Value stored to 'dpg_width' during its initialization is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> --- drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c index 497470513e76..1f8831156bc4 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c @@ -6017,7 +6017,7 @@ static void set_crtc_test_pattern(struct dc_link *link, else if (link->dc->hwss.set_disp_pattern_generator) { struct pipe_ctx *odm_pipe; int opp_cnt = 1; - int dpg_width = width; + int dpg_width; for (odm_pipe = pipe_ctx->next_odm_pipe; odm_pipe; odm_pipe = odm_pipe->next_odm_pipe) opp_cnt++; -- 2.20.1.7.g153144c
next reply other threads:[~2022-01-14 10:44 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-14 10:43 Jiapeng Chong [this message] 2022-01-14 10:43 ` [PATCH] drm/amd/display: Remove redundant initialization of dpg_width Jiapeng Chong 2022-01-14 22:22 ` Alex Deucher 2022-01-14 22:22 ` Alex Deucher
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220114104352.6107-1-jiapeng.chong@linux.alibaba.com \ --to=jiapeng.chong@linux.alibaba.com \ --cc="alexander.deucher@amd.comalexander.deucher"@amd.com \ --cc=Xinhui.Pan@amd.com \ --cc=abaci@linux.alibaba.com \ --cc=amd-gfx@lists.freedesktop.org \ --cc=christian.koenig@amd.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.