drm/amd/pm: suppress compile warnings about possible unaligned accesses
authorEvan Quan <evan.quan@amd.com>
Mon, 30 May 2022 03:37:07 +0000 (11:37 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 3 Jun 2022 20:43:36 +0000 (16:43 -0400)
commit4513edf74cc82c15bc1cefc2ab62ff25fe67028e
tree586731580a1ee3ba990ae4bca3bac2ec3ea32ed3
parent88467db6e2f46a2e79b1b67ce6873c284e4cf417
drm/amd/pm: suppress compile warnings about possible unaligned accesses

Suppress the following compile warnings:
>> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/inc/smu_v11_0_pptable.h:163:17:
warning: field smc_pptable within 'struct smu_11_0_powerplay_table' is
less aligned than 'PPTable_t' and is usually due to 'struct smu_11_0_powerplay_table'
being packed, which can lead to unaligned accesses [-Wunaligned-access]
         PPTable_t smc_pptable;                        //PPTable_t in smu11_driver_if.h
                   ^
   1 warning generated.
--
>> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/inc/smu_v11_0_7_pptable.h:193:17:
warning: field smc_pptable within 'struct smu_11_0_7_powerplay_table' is
less aligned than 'PPTable_t' and is usually due to 'struct smu_11_0_7_powerplay_table'
being packed, which can lead to unaligned accesses [-Wunaligned-access]
         PPTable_t smc_pptable;                        //PPTable_t in smu11_driver_if.h
                   ^
   1 warning generated.
--
>> drivers/gpu/drm/amd/amdgpu/../pm/swsmu/inc/smu_v13_0_pptable.h:161:12:
warning: field smc_pptable within 'struct smu_13_0_powerplay_table' is less aligned than
'PPTable_t' and is usually due to 'struct smu_13_0_powerplay_table' being packed, which
can lead to unaligned accesses [-Wunaligned-access]

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v11_0_7_pptable.h
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v11_0_pptable.h
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0_7_pptable.h
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0_pptable.h