All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug report] drm/amd/pp: Implement edit_dpm_table on smu7
@ 2018-03-02 10:16 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2018-03-02 10:16 UTC (permalink / raw)
  To: Rex.Zhu-5C7GfCeVMHo; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-02 10:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-02 10:16 [bug report] drm/amd/pp: Implement edit_dpm_table on smu7 Dan Carpenter

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.