From: Dan Carpenter <dan.carpenter@linaro.org>
To: Qingqing.Zhuo@amd.com
Cc: amd-gfx@lists.freedesktop.org
Subject: [bug report] drm/amd/display: Introduce DML2
Date: Wed, 8 May 2024 15:29:33 +0300 [thread overview]
Message-ID: <41ac2ee2-290e-4c85-8df6-163bb168862f@moroto.mountain> (raw)
Hello Qingqing Zhuo,
This is a semi-automatic email about new static checker warnings.
Commit 7966f319c66d ("drm/amd/display: Introduce DML2") from Jul 28,
2023, leads to the following Smatch complaint:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_wrapper.c:576 dml2_validate_and_build_resource()
warn: variable dereferenced before check 'context' (see line 569)
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_wrapper.c:665 dml2_validate_only()
warn: variable dereferenced before check 'context' (see line 662)
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml2_wrapper.c
568 {
569 struct dml2_context *dml2 = context->bw_ctx.dml2;
^^^^^^^^^
Dereferenced
570 struct dml2_wrapper_scratch *s = &dml2->v20.scratch;
571 struct dml2_dcn_clocks out_clks;
572 unsigned int result = 0;
573 bool need_recalculation = false;
574 uint32_t cstate_enter_plus_exit_z8_ns;
575
576 if (!context || context->stream_count == 0)
^^^^^^^^
Checked too late
577 return true;
578
regards,
dan carpenter
next reply other threads:[~2024-05-09 9:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-08 12:29 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-10-20 13:54 [bug report] drm/amd/display: Introduce DML2 Dan Carpenter
2023-10-20 12:39 Dan Carpenter
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=41ac2ee2-290e-4c85-8df6-163bb168862f@moroto.mountain \
--to=dan.carpenter@linaro.org \
--cc=Qingqing.Zhuo@amd.com \
--cc=amd-gfx@lists.freedesktop.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: 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).