]> git.baikalelectronics.ru Git - kernel.git/commitdiff
LoongArch: Use flexible-array member instead of zero-length array
authorYushan Zhou <katrinzhou@tencent.com>
Sat, 29 Oct 2022 08:29:31 +0000 (16:29 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Sat, 29 Oct 2022 08:29:31 +0000 (16:29 +0800)
Eliminate the following coccicheck warning:
./arch/loongarch/include/asm/ptrace.h:32:15-21: WARNING use flexible-array member instead

Reviewed-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Yushan Zhou <katrinzhou@tencent.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/include/asm/ptrace.h

index 82649a78fec1af2237ec5dd72a7f3f2d866a5db5..59c4608de91db938a6eb805db3da8f7b68948278 100644 (file)
@@ -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)