dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Rex.Zhu@amd.com
Cc: dri-devel@lists.freedesktop.org
Subject: [bug report] drm/amd/powerplay: implement smu7 hwmgr to manager asics with smu ip version 7.
Date: Wed, 12 Oct 2016 09:11:57 +0300	[thread overview]
Message-ID: <20161012061157.GJ12841@mwanda> (raw)

Hello Rex Zhu,

This is a semi-automatic email about new static checker warnings.

The patch 599a7e9fe1b6: "drm/amd/powerplay: implement smu7 hwmgr to 
manager asics with smu ip version 7." from Sep 9, 2016, leads to the 
following Smatch complaint:

drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c:1463 smu7_get_evv_voltages()
	 error: we previously assumed 'table_info' could be null (see line 1455)

drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c
  1454	
  1455		if (table_info != NULL)
                     ^^^^^^^^^^^^^^^^^
Check for non-NULL.

  1456			sclk_table = table_info->vdd_dep_on_sclk;
  1457	
  1458		for (i = 0; i < SMU7_MAX_LEAKAGE_COUNT; i++) {
  1459			vv_id = ATOM_VIRTUAL_VOLTAGE_ID0 + i;
  1460	
  1461			if (data->vdd_gfx_control == SMU7_VOLTAGE_CONTROL_BY_SVID2) {
  1462				if (0 == phm_get_sclk_for_voltage_evv(hwmgr,
  1463							table_info->vddgfx_lookup_table, vv_id, &sclk)) {
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Unchecked dereference.

  1464					if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
  1465								PHM_PlatformCaps_ClockStretcher)) {

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2016-10-12  6:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-12  6:11 Dan Carpenter [this message]
2016-10-13  7:43 ` [bug report] drm/amd/powerplay: implement smu7 hwmgr to manager asics with smu ip version 7 Zhu, Rex
2016-10-13  7:50   ` Christian König
  -- strict thread matches above, loose matches on Subject: below --
2016-10-14 14:32 Dan Carpenter
2016-10-14 15:13 ` Alex Deucher
2016-10-17 10:17   ` Zhu, Rex

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=20161012061157.GJ12841@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=Rex.Zhu@amd.com \
    --cc=dri-devel@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