Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xtensa: ptrace: Remove zero-length alignment array

Use a compiler attribute to align the areg field to 16 bytes instead of
using a zero-length alignment array.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Message-Id: <20250219114759.20110-2-thorsten.blum@linux.dev>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>

authored by

Thorsten Blum and committed by
Max Filippov
dbef257a ffd294d3

+1 -4
+1 -4
arch/xtensa/include/asm/ptrace.h
··· 72 72 /* Additional configurable registers that are used by the compiler. */ 73 73 xtregs_opt_t xtregs_opt; 74 74 75 - /* Make sure the areg field is 16 bytes aligned. */ 76 - int align[0] __attribute__ ((aligned(16))); 77 - 78 75 /* current register frame. 79 76 * Note: The ESF for kernel exceptions ends after 16 registers! 80 77 */ 81 - unsigned long areg[XCHAL_NUM_AREGS]; 78 + unsigned long areg[XCHAL_NUM_AREGS] __aligned(16); 82 79 }; 83 80 84 81 # define arch_has_single_step() (1)