提交 663e4811 编写于 作者: E Evan Quan 提交者: Alex Deucher

drm/amd/pm: suppress compile warning about possible unaligned accesses

Suppress the following compile warning:
   In file included from drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_0_ppt.c:39:
>> drivers/gpu/drm/amd/amdgpu/../pm/inc/smu_v13_0_0_pptable.h:194:39:
warning: field overdrive_table within 'struct smu_13_0_0_powerplay_table' is
less aligned than 'struct smu_13_0_0_overdrive_table' and is usually due to
'struct smu_13_0_0_powerplay_table' being packed,
which can lead to unaligned accesses [-Wunaligned-access]
Reported-by: Nkernel test robot <lkp@intel.com>
Signed-off-by: NEvan Quan <evan.quan@amd.com>
Acked-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 0ae99221
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
#ifndef SMU_13_0_0_PPTABLE_H #ifndef SMU_13_0_0_PPTABLE_H
#define SMU_13_0_0_PPTABLE_H #define SMU_13_0_0_PPTABLE_H
#pragma pack(push, 1)
#define SMU_13_0_0_TABLE_FORMAT_REVISION 15 #define SMU_13_0_0_TABLE_FORMAT_REVISION 15
//// POWERPLAYTABLE::ulPlatformCaps //// POWERPLAYTABLE::ulPlatformCaps
...@@ -194,7 +196,8 @@ struct smu_13_0_0_powerplay_table ...@@ -194,7 +196,8 @@ struct smu_13_0_0_powerplay_table
struct smu_13_0_0_overdrive_table overdrive_table; struct smu_13_0_0_overdrive_table overdrive_table;
uint8_t padding1; uint8_t padding1;
PPTable_t smc_pptable; //PPTable_t in driver_if.h PPTable_t smc_pptable; //PPTable_t in driver_if.h
} __attribute__((packed)); };
#pragma pack(pop)
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册