Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp5915033rwi; Tue, 18 Oct 2022 06:01:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5THBSiixadE1OxLxmkVtBwtJwDHXZ0M2dQIYGUGK6ASzKcZ8YcSu/GJijSKf69o/ZoELZy X-Received: by 2002:a17:90b:17ca:b0:20d:76bb:3f8c with SMTP id me10-20020a17090b17ca00b0020d76bb3f8cmr38197568pjb.28.1666098068553; Tue, 18 Oct 2022 06:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666098068; cv=none; d=google.com; s=arc-20160816; b=jJ2ElQBxOmFl+CjRBsFO5T4wD63dr3CQN3J7a/1QlRdRUCUhVouGUEQ3zErg1Do0Fs hbll5sBg2f2sp3B5ozbsWZO/IQRAuF+765LlvWvY3tT39NU3stIUquCtqENYUBDzTq1T CmXKgdCoNxT3PJuDswirBn50HthKRQa7SJN45AETVUmWWQgEl8V0RoWPna2xGImGRzA8 OJ+lfXB/oVxJIiJa3gjvGq6YOthjkVEN8ks0X3V3zdyW5LqiGyZ5onMgcYuFVwHS0RA/ cQVVX0ShaI6SDQJlqUgT7W6aUgCO+ct78pmloCALlbmCruM47YwYNV/rMI5atuhPPsVK ZXSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=76SQuyqgtLsrs4y9qQ3fVI7tlagzCf+xt6ARL6TKZys=; b=JBe7W4zdnh11Cn+ZffnKjGefjNZBj4e36792/OPPUwODbE6QY1xdSVjiqzU7p/yRe6 npb3Rq49JvirXmnRolKy2mkwFKeXNWl2EYGd8igUKvs+IzBXjxRbzyt+6MLX7QgeZa75 gUFg4X7mViMM/tmmWzx53b0d+ioMM5JBTavokLeI+b7ixG13ogNwxkCB2KITC6Qi+TVa tk0ThX476LlhjPvCzU1QfYeRaX9VYte9sRlZ2mlKb17eFkL1flaPiqkLvU5DvPtMSeFD B4eq4+Ieae1pwhuAKufmNWVpwXP+OzpTQvr6QXfyra9n2kWOQEheA8tv8BzI71hUvJnc Mq8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=q39rCzmJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d32-20020a631d60000000b00429f4b62461si15207132pgm.431.2022.10.18.06.00.51; Tue, 18 Oct 2022 06:01:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@xen0n.name header.s=mail header.b=q39rCzmJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230084AbiJRM1t (ORCPT + 99 others); Tue, 18 Oct 2022 08:27:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229491AbiJRM1r (ORCPT ); Tue, 18 Oct 2022 08:27:47 -0400 Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F920B1DF5 for ; Tue, 18 Oct 2022 05:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail; t=1666096064; bh=GL+rlXoOxGmGApSv3L9SAXqNdDYDUffuAVXsj7dTPI8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=q39rCzmJDf0frLXFRDkDji03DUoyRapZULiPBo3S919f4p94iuxbswBSqDhGzKHuf D5f8UahmxpXkRnooTdVK8Kub/Jmt14jSOAXTVSnKF64sBX6iFs/UtMJ6rpdoy6hdzD rJpKIRk2vyzdaBneAZZLrpVVi3/xldO2LhK7X8Wg= Received: from [100.100.57.122] (unknown [220.248.53.61]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailbox.box.xen0n.name (Postfix) with ESMTPSA id CF84D6011C; Tue, 18 Oct 2022 20:27:43 +0800 (CST) Message-ID: <59b75b38-8995-ea54-b5cf-eca78249b65e@xen0n.name> Date: Tue, 18 Oct 2022 20:27:43 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:107.0) Gecko/20100101 Thunderbird/107.0a1 Subject: Re: [PATCH] LoongArch: use flexible-array member instead of zero-length array Content-Language: en-US To: zys.zljxml@gmail.com, chenhuacai@kernel.org Cc: oleg@redhat.com, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, chenhuacai@loongson.cn, lixuefeng@loongson.cn, yangtiezhu@loongson.cn, Yushan Zhou References: <20221018094742.324576-1-zys.zljxml@gmail.com> From: WANG Xuerui In-Reply-To: <20221018094742.324576-1-zys.zljxml@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/10/18 17:47, zys.zljxml@gmail.com wrote: > From: Yushan Zhou > > 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 > --- > 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 -- WANG "xen0n" Xuerui Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/