All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xtensa: Remove zero-length alignment array
@ 2024-12-09 11:08 Thorsten Blum
  2024-12-09 11:59 ` Max Filippov
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2024-12-09 11:08 UTC (permalink / raw)
  To: Chris Zankel, Max Filippov; +Cc: Thorsten Blum, linux-kernel

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xtensa: Remove zero-length alignment array
  2024-12-09 11:08 [PATCH] xtensa: Remove zero-length alignment array Thorsten Blum
@ 2024-12-09 11:59 ` Max Filippov
  0 siblings, 0 replies; 2+ messages in thread
From: Max Filippov @ 2024-12-09 11:59 UTC (permalink / raw)
  To: Thorsten Blum; +Cc: Chris Zankel, linux-kernel

On Mon, Dec 9, 2024 at 3:10 AM Thorsten Blum <thorsten.blum@linux.dev> wrote:
>
> 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(-)

Applied to my xtensa tree.
-- 
Thanks.
-- Max

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-09 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09 11:08 [PATCH] xtensa: Remove zero-length alignment array Thorsten Blum
2024-12-09 11:59 ` Max Filippov

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.