]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
xtensa: ptrace: Remove zero-length alignment array
authorThorsten Blum <thorsten.blum@linux.dev>
Wed, 19 Feb 2025 11:48:00 +0000 (12:48 +0100)
committerMax Filippov <jcmvbkbc@gmail.com>
Wed, 19 Feb 2025 17:06:37 +0000 (09:06 -0800)
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>
arch/xtensa/include/asm/ptrace.h

index 86c70117371bb7cc022b0793f0a4eb8ef834bc63..4871e5a4d6fbe447910a2f5d29ce2d899bb87265 100644 (file)
@@ -72,13 +72,10 @@ struct pt_regs {
        /* Additional configurable registers that are used by the compiler. */
        xtregs_opt_t xtregs_opt;
 
-       /* Make sure the areg field is 16 bytes aligned. */
-       int align[0] __attribute__ ((aligned(16)));
-
        /* current register frame.
         * Note: The ESF for kernel exceptions ends after 16 registers!
         */
-       unsigned long areg[XCHAL_NUM_AREGS];
+       unsigned long areg[XCHAL_NUM_AREGS] __aligned(16);
 };
 
 # define arch_has_single_step()        (1)