Skip to contentSkip to conversation

xtensa: Remove zero-length alignment array

PATCH Applied Thorsten Blum 2 participants 2 messages Dec 9, 2024 Tensilica Xtensa port (xtensa)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xtensa: Remove zero-length alignment array

Align the whole struct to 16 bytes instead of using a zero-length alignment array.

---
 arch/xtensa/include/asm/processor.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/xtensa/include/asm/processor.h +1 -3
index 7ed1a2085bd7..5c88c97abe4e 100644
@@ -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.
Signature · 1 line
2.47.1
maintainer Applied
#1 lore raw
Quoted 8 lines · Thorsten Blum

Align the whole struct to 16 bytes instead of using a zero-length alignment array.

---
 arch/xtensa/include/asm/processor.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Applied to my xtensa tree.

Signature · 2 lines
Thanks.
-- Max