include: sbi: No need to pack struct sbi_trap_regs
authorAnup Patel <anup.patel@wdc.com>
Mon, 11 Jan 2021 10:55:38 +0000 (16:25 +0530)
committerAnup Patel <anup@brainfault.org>
Fri, 15 Jan 2021 05:10:29 +0000 (10:40 +0530)
All members in struct sbi_trap_regs are of machine word size so
no need to pack this structure. This also allows GCC to generate
more optimized instruction sequence when accessing members of
struct sbi_trap_regs.

Reported-by: Paul Campbell <taniwha@gmail.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
include/sbi/sbi_trap.h

index 04001df7a7f0c08c37c7fe1975858904ddf95e6f..5fb94f980e6bf32b05de62fbf5fb7bb56fea9e67 100644 (file)
@@ -186,7 +186,7 @@ struct sbi_trap_regs {
        unsigned long mstatus;
        /** mstatusH register state (only for 32-bit) */
        unsigned long mstatusH;
-} __packed;
+};
 
 /** Representation of trap details */
 struct sbi_trap_info {