From: Alex Hung <alex.hung@amd.com>
To: "Ваторопин Андрей" <a.vatoropin@crpt.ru>,
"Harry Wentland" <harry.wentland@amd.com>
Cc: "Leo Li" <sunpeng.li@amd.com>,
"Rodrigo Siqueira" <siqueira@igalia.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Dillon Varone" <dillon.varone@amd.com>,
"Roman Li" <roman.li@amd.com>,
"Ethan Carter Edwards" <ethan@ethancedwards.com>,
"Ivan Lipski" <ivlipski@amd.com>,
"Iswara Nagulendran" <iswara.nagulendran@amd.com>,
"Hersen Wu" <hersenxs.wu@amd.com>,
"Rafal Ostrowski" <rostrows@amd.com>,
"Alvin Lee" <alvin.lee2@amd.com>, "Aric Cyr" <aric.cyr@amd.com>,
"Dr. David Alan Gilbert" <linux@treblig.org>,
"Srinivasan Shanmugam" <srinivasan.shanmugam@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"lvc-project@linuxtesting.org" <lvc-project@linuxtesting.org>
Subject: Re: [PATCH] drm/amd/display: Remove the redundant NULL check
Date: Wed, 2 Apr 2025 19:30:17 -0600 [thread overview]
Message-ID: <ee4b2ca0-137d-4bbf-8d44-25c263bbac55@amd.com> (raw)
In-Reply-To: <20250402142134.375176-1-a.vatoropin@crpt.ru>
Reviewed-by: Alex Hung <alex.hung@amd.com>
On 4/2/25 08:21, Ваторопин Андрей wrote:
> From: Andrey Vatoropin <a.vatoropin@crpt.ru>
>
> Static analysis shows that pointer "timing" cannot be NULL because it
> points to the object "struct dc_crtc_timing".
>
> Remove the extra NULL check. It is meaningless and harms the readability
> of the code.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Andrey Vatoropin <a.vatoropin@crpt.ru>
> ---
> drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c b/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
> index 13202ce30d66..76e8c4dcf339 100644
> --- a/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/resource/dcn30/dcn30_resource.c
> @@ -1891,8 +1891,6 @@ static int get_refresh_rate(struct dc_state *context)
>
> /* check if refresh rate at least 120hz */
> timing = &context->streams[0]->timing;
> - if (timing == NULL)
> - return 0;
>
> h_v_total = timing->h_total * timing->v_total;
> if (h_v_total == 0)
prev parent reply other threads:[~2025-04-03 1:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-02 14:21 [PATCH] drm/amd/display: Remove the redundant NULL check Ваторопин Андрей
2025-04-03 1:30 ` Alex Hung [this message]
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=ee4b2ca0-137d-4bbf-8d44-25c263bbac55@amd.com \
--to=alex.hung@amd.com \
--cc=a.vatoropin@crpt.ru \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=alvin.lee2@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=aric.cyr@amd.com \
--cc=christian.koenig@amd.com \
--cc=dillon.varone@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ethan@ethancedwards.com \
--cc=harry.wentland@amd.com \
--cc=hersenxs.wu@amd.com \
--cc=iswara.nagulendran@amd.com \
--cc=ivlipski@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@treblig.org \
--cc=lvc-project@linuxtesting.org \
--cc=roman.li@amd.com \
--cc=rostrows@amd.com \
--cc=simona@ffwll.ch \
--cc=siqueira@igalia.com \
--cc=srinivasan.shanmugam@amd.com \
--cc=sunpeng.li@amd.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox