All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [bug report] drm/amd/pp: Change voltage/clk range for OD feature on VI
Date: Thu, 17 May 2018 16:43:32 +0300	[thread overview]
Message-ID: <20180517134332.GA16847@mwanda> (raw)

Hello Rex Zhu,

The patch d389d607e608: "drm/amd/pp: Change voltage/clk range for OD
feature on VI" from Apr 18, 2018, leads to the following static
checker warning:

	drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c:872 smu7_setup_voltage_range_from_vbios()
	error: uninitialized symbol 'min_vddc'.

drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c
   857  static void smu7_setup_voltage_range_from_vbios(struct pp_hwmgr *hwmgr)
   858  {
   859          struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
   860          struct phm_ppt_v1_clock_voltage_dependency_table *dep_sclk_table;
   861          struct phm_ppt_v1_information *table_info =
   862                          (struct phm_ppt_v1_information *)(hwmgr->pptable);
   863          uint32_t min_vddc, max_vddc;
   864  
   865          if (!table_info)
   866                  return;
   867  
   868          dep_sclk_table = table_info->vdd_dep_on_sclk;
   869  
   870          atomctrl_get_voltage_range(hwmgr, &max_vddc, &min_vddc);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This doesn't necessarily initialize the parameters.

   871  
   872          if (min_vddc == 0 || min_vddc > 2000
   873                  || min_vddc > dep_sclk_table->entries[0].vddc)
   874                  min_vddc = dep_sclk_table->entries[0].vddc;
   875  
   876          if (max_vddc == 0 || max_vddc > 2000
   877                  || max_vddc < dep_sclk_table->entries[dep_sclk_table->count-1].vddc)
   878                  max_vddc = dep_sclk_table->entries[dep_sclk_table->count-1].vddc;
   879  
   880          data->odn_dpm_table.min_vddc = min_vddc;
   881          data->odn_dpm_table.max_vddc = max_vddc;
   882  }

See also:
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c:872 smu7_setup_voltage_range_from_vbios() error: uninitialized symbol 'min_vddc'.
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c:876 smu7_setup_voltage_range_from_vbios() error: uninitialized symbol 'max_vddc'.
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1588 vegam_populate_clock_stretcher_data_table() error: uninitialized symbol 'efuse'.
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1725 vegam_populate_avfs_parameters() error: uninitialized symbol 'tmp'.


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

                 reply	other threads:[~2018-05-17 13:43 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=20180517134332.GA16847@mwanda \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=Rex.Zhu-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=dri-devel-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 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.