mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] LoongArch: use flexible-array member instead of zero-length array
@ 2022-10-18  9:47 zys.zljxml
  2022-10-18 12:27 ` WANG Xuerui
  0 siblings, 1 reply; 3+ messages in thread
From: zys.zljxml @ 2022-10-18  9:47 UTC (permalink / raw)
  To: chenhuacai
  Cc: kernel, oleg, loongarch, linux-kernel, chenhuacai, lixuefeng,
	yangtiezhu, Yushan Zhou

From: Yushan Zhou <katrinzhou@tencent.com>

Eliminate the following coccicheck warning:
./arch/loongarch/include/asm/ptrace.h:32:15-21: WARNING use flexible-array member instead

Signed-off-by: Yushan Zhou <katrinzhou@tencent.com>
---
 arch/loongarch/include/asm/ptrace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/loongarch/include/asm/ptrace.h b/arch/loongarch/include/asm/ptrace.h
index 17838c6b7ccd..7437b9366c3b 100644
--- a/arch/loongarch/include/asm/ptrace.h
+++ b/arch/loongarch/include/asm/ptrace.h
@@ -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)
-- 
2.27.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-18 12:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-18  9:47 [PATCH] LoongArch: use flexible-array member instead of zero-length array zys.zljxml
2022-10-18 12:27 ` WANG Xuerui
2022-10-18 12:40   ` Huacai Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®