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

* Re: [PATCH] LoongArch: use flexible-array member instead of zero-length array
  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
  0 siblings, 1 reply; 3+ messages in thread
From: WANG Xuerui @ 2022-10-18 12:27 UTC (permalink / raw)
  To: zys.zljxml, chenhuacai
  Cc: oleg, loongarch, linux-kernel, chenhuacai, lixuefeng, yangtiezhu,
	Yushan Zhou

On 2022/10/18 17:47, zys.zljxml@gmail.com wrote:
> 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)

Seems good. Thanks.

Reviewed-by: WANG Xuerui <git@xen0n.name>

-- 
WANG "xen0n" Xuerui

Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/


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

* Re: [PATCH] LoongArch: use flexible-array member instead of zero-length array
  2022-10-18 12:27 ` WANG Xuerui
@ 2022-10-18 12:40   ` Huacai Chen
  0 siblings, 0 replies; 3+ messages in thread
From: Huacai Chen @ 2022-10-18 12:40 UTC (permalink / raw)
  To: WANG Xuerui
  Cc: zys.zljxml, oleg, loongarch, linux-kernel, chenhuacai, lixuefeng,
	yangtiezhu, Yushan Zhou

Queued for loongarch-fixes

On Tue, Oct 18, 2022 at 8:27 PM WANG Xuerui <kernel@xen0n.name> wrote:
>
> On 2022/10/18 17:47, zys.zljxml@gmail.com wrote:
> > 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)
>
> Seems good. Thanks.
>
> Reviewed-by: WANG Xuerui <git@xen0n.name>
>
> --
> WANG "xen0n" Xuerui
>
> Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/
>
>

^ 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®