From: jsg Date: Tue, 14 Feb 2023 11:31:47 +0000 (+0000) Subject: use pragma pack around dmub_addr definition X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=12139144481c3d519ea04a8a115f5b429e40a4f8;p=openbsd use pragma pack around dmub_addr definition Avoids warnings about alignment changing when embedded inside of a packed struct (dmub_rb_cmd_mall) seen with clang 15 on arm64. reported and compile tested by tb@ sent upstream to amd-gfx list --- diff --git a/sys/dev/pci/drm/amd/display/dmub/inc/dmub_cmd.h b/sys/dev/pci/drm/amd/display/dmub/inc/dmub_cmd.h index 7a8f6151742..1bc2832a71d 100644 --- a/sys/dev/pci/drm/amd/display/dmub/inc/dmub_cmd.h +++ b/sys/dev/pci/drm/amd/display/dmub/inc/dmub_cmd.h @@ -162,6 +162,7 @@ extern "C" { #define dmub_udelay(microseconds) udelay(microseconds) #endif +#pragma pack(push, 1) /** * union dmub_addr - DMUB physical/virtual 64-bit address. */ @@ -172,6 +173,7 @@ union dmub_addr { } u; /*<< Low/high bit access */ uint64_t quad_part; /*<< 64 bit address */ }; +#pragma pack(pop) /** * Dirty rect definition.