RE: drm/amd/powerplay: enable dpm for baffin.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It is a bug. I will fix it.

Best Regars
Rex

-----Original Message-----
From: Dan Carpenter [mailto:dan.carpenter@xxxxxxxxxx] 
Sent: Tuesday, May 10, 2016 3:42 AM
To: Zhu, Rex
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: re: drm/amd/powerplay: enable dpm for baffin.

Hello Rex Zhu,

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

The patch a23eefa2f461: "drm/amd/powerplay: enable dpm for baffin." 
from Nov 19, 2015, leads to the following Smatch complaint:

drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/polaris10_hwmgr.c:206 phm_apply_dal_min_voltage_request()
	 error: we previously assumed 'table' could be null (see line 202)

drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/polaris10_hwmgr.c
   201	
   202		if (!table && !(dal_power_level >= PP_DAL_POWERLEVEL_ULTRALOW &&
                           ^^
Should this be an ||?

   203				dal_power_level <= PP_DAL_POWERLEVEL_PERFORMANCE))
   204			return;
   205	
   206		for (i = 0; i < table->count; i++) {
                                ^^^^^^^^^^^^ Because if table is ever NULL then we're toasted on the next line.

   207			if (dal_power_level == table->entries[i].clk) {
   208				req_vddc = table->entries[i].v;

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux