drm/amd/pm: avoid unaligned access warnings
When building on OpenBSD/arm64 with clang 15, unaligned access warnings are seen when a union is embedded inside a packed struct. drm/amd/pm/powerplay/hwmgr/vega20_pptable.h:136:17: error: field smcPPTable within 'struct _ATOM_VEGA20_POWERPLAYTABLE' is less aligned than 'PPTable_t' and is usually due to 'struct _ATOM_VEGA20_POWERPLAYTABLE' being packed, which can lead to unaligned accesses [-Werror,-Wunaligned-access] PPTable_t smcPPTable; ^ Make PPTable_t packed to avoid this. Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Showing
Please register or sign in to comment