[radeon-alex:amd-staging-drm-next 1046/1062] drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.c:43:2: warning: this 'if' clause does not guard...

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

 



tree:   git://people.freedesktop.org/~agd5f/linux.git amd-staging-drm-next
head:   6761ccd944db730dca6f9033781b4645a6eecfd4
commit: 8e62ef009a4bb61d25d391d0384f3314cc6d2059 [1046/1062] drm/amd/pp: Use atombios api directly in powerplay
config: x86_64-randconfig-s5-03290316 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout 8e62ef009a4bb61d25d391d0384f3314cc6d2059
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.c: In function 'pp_atomfwctrl_lookup_voltage_type_v4':
>> drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.c:43:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (voltage_type == voltage_object->gpio_voltage_obj.header.voltage_type &&
     ^~
   drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.c:47:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
      offset += le16_to_cpu(voltage_object->gpio_voltage_obj.header.object_size);
      ^~~~~~

vim +/if +43 drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/ppatomfwctrl.c

0d2c7569e Eric Huang 2017-03-03  28  
0d2c7569e Eric Huang 2017-03-03  29  static const union atom_voltage_object_v4 *pp_atomfwctrl_lookup_voltage_type_v4(
0d2c7569e Eric Huang 2017-03-03  30  		const struct atom_voltage_objects_info_v4_1 *voltage_object_info_table,
0d2c7569e Eric Huang 2017-03-03  31  		uint8_t voltage_type, uint8_t voltage_mode)
0d2c7569e Eric Huang 2017-03-03  32  {
0d2c7569e Eric Huang 2017-03-03  33  	unsigned int size = le16_to_cpu(
0d2c7569e Eric Huang 2017-03-03  34  			voltage_object_info_table->table_header.structuresize);
0d2c7569e Eric Huang 2017-03-03  35  	unsigned int offset =
0d2c7569e Eric Huang 2017-03-03  36  			offsetof(struct atom_voltage_objects_info_v4_1, voltage_object[0]);
0d2c7569e Eric Huang 2017-03-03  37  	unsigned long start = (unsigned long)voltage_object_info_table;
0d2c7569e Eric Huang 2017-03-03  38  
0d2c7569e Eric Huang 2017-03-03  39  	while (offset < size) {
0d2c7569e Eric Huang 2017-03-03  40  		const union atom_voltage_object_v4 *voltage_object =
0d2c7569e Eric Huang 2017-03-03  41  				(const union atom_voltage_object_v4 *)(start + offset);
0d2c7569e Eric Huang 2017-03-03  42  
0d2c7569e Eric Huang 2017-03-03 @43  	if (voltage_type == voltage_object->gpio_voltage_obj.header.voltage_type &&
0d2c7569e Eric Huang 2017-03-03  44  		voltage_mode == voltage_object->gpio_voltage_obj.header.voltage_mode)
0d2c7569e Eric Huang 2017-03-03  45  		return voltage_object;
0d2c7569e Eric Huang 2017-03-03  46  
0d2c7569e Eric Huang 2017-03-03  47  		offset += le16_to_cpu(voltage_object->gpio_voltage_obj.header.object_size);
0d2c7569e Eric Huang 2017-03-03  48  
0d2c7569e Eric Huang 2017-03-03  49  	}
0d2c7569e Eric Huang 2017-03-03  50  
0d2c7569e Eric Huang 2017-03-03  51  	return NULL;
0d2c7569e Eric Huang 2017-03-03  52  }
0d2c7569e Eric Huang 2017-03-03  53  

:::::: The code at line 43 was first introduced by commit
:::::: 0d2c7569e1963f10f418c3f8a1c62b0935aa110f drm/amdgpu: add new atomfirmware based helpers for powerplay

:::::: TO: Eric Huang <JinHuiEric.Huang@xxxxxxx>
:::::: CC: Alex Deucher <alexander.deucher@xxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
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