From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [bug report] drm/amd/pp: Implement edit_dpm_table on smu7
Date: Fri, 2 Mar 2018 13:16:20 +0300 [thread overview]
Message-ID: <20180302101620.GA11345@mwanda> (raw)
Hello Rex Zhu,
The patch 5e4d4fbea557: "drm/amd/pp: Implement edit_dpm_table on
smu7" from Jan 16, 2018, leads to the following static checker
warning:
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c:4784 smu7_check_clk_voltage_valid()
warn: signedness bug returning '(-22)'
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c
4771 static bool smu7_check_clk_voltage_valid(struct pp_hwmgr *hwmgr,
^^^^
4772 enum PP_OD_DPM_TABLE_COMMAND type,
4773 uint32_t clk,
4774 uint32_t voltage)
4775 {
4776 struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
4777
4778 struct phm_ppt_v1_information *table_info =
4779 (struct phm_ppt_v1_information *)(hwmgr->pptable);
4780 uint32_t min_vddc;
4781 struct phm_ppt_v1_clock_voltage_dependency_table *dep_sclk_table;
4782
4783 if (table_info == NULL)
4784 return -EINVAL;
^^^^^^^^^^^^^^^
This means "return true;". Can table_info really be NULL, anyway?
4785
4786 dep_sclk_table = table_info->vdd_dep_on_sclk;
4787 min_vddc = dep_sclk_table->entries[0].vddc;
4788
regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
reply other threads:[~2018-03-02 10:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20180302101620.GA11345@mwanda \
--to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
--cc=Rex.Zhu-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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