From: Thorsten Blum <thorsten.blum@linux.dev>
To: Chris Zankel <chris@zankel.net>, Max Filippov <jcmvbkbc@gmail.com>
Cc: Thorsten Blum <thorsten.blum@linux.dev>, linux-kernel@vger.kernel.org
Subject: [PATCH] xtensa: Remove zero-length alignment array
Date: Mon, 9 Dec 2024 12:08:56 +0100 [thread overview]
Message-ID: <20241209110856.40132-3-thorsten.blum@linux.dev> (raw)
Align the whole struct to 16 bytes instead of using a zero-length
alignment array.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
arch/xtensa/include/asm/processor.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/xtensa/include/asm/processor.h b/arch/xtensa/include/asm/processor.h
index 7ed1a2085bd7..5c88c97abe4e 100644
--- a/arch/xtensa/include/asm/processor.h
+++ b/arch/xtensa/include/asm/processor.h
@@ -160,9 +160,7 @@ struct thread_struct {
struct perf_event *ptrace_bp[XCHAL_NUM_IBREAK];
struct perf_event *ptrace_wp[XCHAL_NUM_DBREAK];
#endif
- /* Make structure 16 bytes aligned. */
- int align[0] __attribute__ ((aligned(16)));
-};
+} __aligned(16);
/* This decides where the kernel will search for a free chunk of vm
* space during mmap's.
--
2.47.1
next reply other threads:[~2024-12-09 11:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 11:08 Thorsten Blum [this message]
2024-12-09 11:59 ` [PATCH] xtensa: Remove zero-length alignment array Max Filippov
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=20241209110856.40132-3-thorsten.blum@linux.dev \
--to=thorsten.blum@linux.dev \
--cc=chris@zankel.net \
--cc=jcmvbkbc@gmail.com \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.