mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH v3] acpi: fix compilation for 32-bit
Date: Tue, 20 Aug 2024 14:40:34 +0200	[thread overview]
Message-ID: <20240820124034.2870742-1-a.fatoum@pengutronix.de> (raw)

Build test on 32-bit failed because of forcing the bigger alignment on
the flexible array.

Removing the alignment in turn broke the CI tests for 64-bit, so
let's go back to using a packed struct, but have the alignment follow
the size of the pointer.

Fixes: 4fa3b9d2b64b ("acpi: fix compilation for 32-bit")
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
v2 -> v3:
  - make commit apply on top of v1, which has already been applied.
v1 -> v2:
  - fix CI x86_64 breakage, by keeping the packed/aligned specifiction
    as is, but changing it to 32-bit on 32-bit systems.
---
 include/acpi.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/acpi.h b/include/acpi.h
index 837476424664..fc0da30610a6 100644
--- a/include/acpi.h
+++ b/include/acpi.h
@@ -113,9 +113,9 @@ struct __packed acpi_sdt { /* system description table header */
 	u32		creator_revision;
 };
 
-struct acpi_rsdt { /* system description table header */
+struct __packed acpi_rsdt { /* system description table header */
 	struct acpi_sdt	sdt;
-	struct acpi_sdt	*entries[];
+	struct acpi_sdt	*__aligned(sizeof(void *)) entries[];
 };
 
 struct acpi_driver {
-- 
2.39.2




             reply	other threads:[~2024-08-20 12:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-20 12:40 Ahmad Fatoum [this message]
2024-08-22 10:52 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240820124034.2870742-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox