[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <59b75b38-8995-ea54-b5cf-eca78249b65e@xen0n.name>
Date: Tue, 18 Oct 2022 20:27:43 +0800
From: WANG Xuerui <kernel@...0n.name>
To: zys.zljxml@...il.com, chenhuacai@...nel.org
Cc: oleg@...hat.com, loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org, chenhuacai@...ngson.cn,
lixuefeng@...ngson.cn, yangtiezhu@...ngson.cn,
Yushan Zhou <katrinzhou@...cent.com>
Subject: Re: [PATCH] LoongArch: use flexible-array member instead of
zero-length array
On 2022/10/18 17:47, zys.zljxml@...il.com wrote:
> From: Yushan Zhou <katrinzhou@...cent.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@...cent.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@...0n.name>
--
WANG "xen0n" Xuerui
Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/
Powered by blists - more mailing lists