From patchwork Tue Oct 18 09:47:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Katrin Jo X-Patchwork-Id: 4061 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1867346wrs; Tue, 18 Oct 2022 02:58:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM75nZKICKp5FsqzFuRCm1lhtBKKqXnvkqduK+RBVRtNxoxLzEsGugZor1sZqZuqH6LUicUD X-Received: by 2002:a17:90a:354:b0:20a:6867:4a2b with SMTP id 20-20020a17090a035400b0020a68674a2bmr38298648pjf.157.1666087137217; Tue, 18 Oct 2022 02:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666087137; cv=none; d=google.com; s=arc-20160816; b=QwU9GSnpX6X10if80rfkmfmS1+y6XzX4ovOHrjScko704FyDKFzLoanTE5CenA1AHm O2UhQugjD6lApNQvsoGdlo2F5r53r0ZpUWaNCfwkbtuDNbzvFPXNhomztFrZy5rtRKgp HOIVsVfew9+YHuvKsm1hjergGgLbEfv61h8lpI1HPtVx/CrkQDhWDmU6QHYr/y5LdY+P +fFDvbvNuOFwN6eWZc6tLuy0g+bzo7VHbQHc6WwJgGOBxKH4b2zzaMzt5lkX1CqAqGL5 Ifx0AbpYIDwvOZyTVRMmWkPy8GHJmnXejwaDk/PjXkPBE/CKMKXml5AyCR30n9GBh99T sfhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=jgN57VsOmEbW0oef2R7lDWd91i+seWCcSmuwkn3qm8s=; b=0vXWEvDjFJbyoFQ6nCNS6f/A4b7fN5LODnQMTTuGuFrTLirt8WEM3A+o9aMRVS9FSV lkLRAP89hDCYqayx3O+CFrpp546WQ1f4Dn+Ytim/EXctn5QvuSJJQrQGwvmgZ+w4lkSH CESJuX5CY0xG+EHCfmFlPTksE0tnFoEMOblM0d0+jaOlDJ+CYmjm5Yi7Ugg2Ugl7MCvM COtrjetSsIv3MW0pTc2wY0wRb6AHn56aA0E5kWQ+P0HHBc5q3cA1tafrKCWhxlFSPab8 qohxAL6tCK61/zvhgF7O8VWxwrJ0KiEbMJ/di3wOKm+R+UVewDWMxnm9juTvc9DC8ZuB vdqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CXpoZkph; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k25-20020a635619000000b0043946964302si15507566pgb.173.2022.10.18.02.58.44; Tue, 18 Oct 2022 02:58:57 -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=@gmail.com header.s=20210112 header.b=CXpoZkph; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230183AbiJRJsL (ORCPT + 99 others); Tue, 18 Oct 2022 05:48:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229843AbiJRJsJ (ORCPT ); Tue, 18 Oct 2022 05:48:09 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85169B0B0C for ; Tue, 18 Oct 2022 02:48:08 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id y8so13547904pfp.13 for ; Tue, 18 Oct 2022 02:48:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jgN57VsOmEbW0oef2R7lDWd91i+seWCcSmuwkn3qm8s=; b=CXpoZkphNnzb3HdWkvbxbX+OdQIuzsEiDKIALM04EGdA0N5wGbiAERk0wougKpWT7B ZYPyDYdtKD65v7HlfNRkRhb9a5c/7Qs5Dt9bFQDUqTyBXIIDG57SRGr+H1igaqm4O35U nkXYGwJLT5JP7o0fjJn1V1eRGDGTnjs3Co0Ydp+Fe87uScw4Z43sLrfd6OoHFaXaYeKd KQ5oa6fXbGltBKCDCreI3T9P7zeZPvoeBW4dYGcN/qKG9JDmkgFuS5BqQLuA72jt53z9 B3UwHk7OSxxM9gCqhwzpCNhupg5xGuNqWt1fxhcQef3jC2qtTqJOtZAhfPjoJjBr0TaL bOtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jgN57VsOmEbW0oef2R7lDWd91i+seWCcSmuwkn3qm8s=; b=wk6UVAk3l3c1xln1Gtef6MdK/0hhk742SwOvBsaqaLLiwMAi9SakP+xXi0W0Vu8IWR NdZxSZaIL07dVorU8cUIcX3xbq1/1ic+6hUJ24OW/ORE8byMW93IEnv/kJ/sjREtxa8e kLQiDe7KBVOJnaDfofAI6KKdkXLVKEDiIpD7Cx6S/y2xavt0Swd4z6hj4Vyiv0bEHJ2U pxPR5dyw0ev1ME2MCDuS7Bx/taPO3h+YG4yEeZI1ZF+3XXv3eZozVtd5F8naxDpj3HhS OZDoYxjgLjVbw+toBU9vMrsU8pmFpiNtDu+W+PgWS0SaZs8ZJZCwX1jPfOd4uQsvMcST LtMQ== X-Gm-Message-State: ACrzQf3lydtgZbMKJnH0rTgpAVmOedVnDEvXvyYjdSaHDiM0q/Lj+4mD gg4FmGkdUDEdyJPASD3itKM= X-Received: by 2002:a63:8549:0:b0:461:3995:60d1 with SMTP id u70-20020a638549000000b00461399560d1mr1931790pgd.105.1666086488060; Tue, 18 Oct 2022 02:48:08 -0700 (PDT) Received: from localhost.localdomain ([43.132.141.4]) by smtp.gmail.com with ESMTPSA id q19-20020aa79613000000b005635477c42dsm8775730pfg.133.2022.10.18.02.48.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 02:48:07 -0700 (PDT) From: zys.zljxml@gmail.com To: chenhuacai@kernel.org Cc: kernel@xen0n.name, oleg@redhat.com, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, chenhuacai@loongson.cn, lixuefeng@loongson.cn, yangtiezhu@loongson.cn, Yushan Zhou Subject: [PATCH] LoongArch: use flexible-array member instead of zero-length array Date: Tue, 18 Oct 2022 17:47:42 +0800 Message-Id: <20221018094742.324576-1-zys.zljxml@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747018985530902151?= X-GMAIL-MSGID: =?utf-8?q?1747018985530902151?= 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 Reviewed-by: WANG Xuerui --- 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)