Skip to content

Commit

Permalink
LoongArch: Use flexible-array member instead of zero-length array
Browse files Browse the repository at this point in the history
Eliminate the following coccicheck warning:
./arch/loongarch/include/asm/ptrace.h:32:15-21: WARNING use flexible-array member instead

Reviewed-by: WANG Xuerui <[email protected]>
Signed-off-by: Yushan Zhou <[email protected]>
Signed-off-by: Huacai Chen <[email protected]>
  • Loading branch information
KatrinJo authored and chenhuacai committed Oct 29, 2022
1 parent b40fa75 commit 4805a13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/loongarch/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct pt_regs {
unsigned long csr_euen;
unsigned long csr_ecfg;
unsigned long csr_estat;
unsigned long __last[0];
unsigned long __last[];
} __aligned(8);

static inline int regs_irqs_disabled(struct pt_regs *regs)
Expand Down

0 comments on commit 4805a13

Please sign in to comment.