Message ID | 202211150858513761518@zte.com.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2450787wru; Mon, 14 Nov 2022 17:04:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf4AvRxs6DHq04R8r+QUNu2ugLKv6G8T1WpZ3337/o3onj+e/NMPTL5c8JmPf471otgHfYxl X-Received: by 2002:a05:6a00:1f0a:b0:56b:a149:1d89 with SMTP id be10-20020a056a001f0a00b0056ba1491d89mr15714676pfb.83.1668474248420; Mon, 14 Nov 2022 17:04:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668474248; cv=none; d=google.com; s=arc-20160816; b=eQ/DjZRk6YRmCj38uorDSHNfOTJjFWxErx7EF9+B2mAFGGSpgOltJLRnPrJUfU9gPB d8Wk/UMxuwat9FqKR2UmNGVGEcd833Lf4nsEActaF8gUwm6Ya3FhO3xp8K9JvHuDvtxl 38/n/cetbTE3be7KJ11LqKuiJ5B1xnhK4ENU1Z9Rfe8TUk5eh6uIM0WWO/m5OFui/Std JL9ewPEqBVndx2LjWu+x2TGaUDJ1TFW+45JKkScH+lwyW8ySd66NSXPrHof2WvX++O6L 14FSRx1F4Tl9OPmqN6lSNS7QQxy76diiaRBPkD11NjkEp6qKGTve7ofbw5IlfmviSW+O ZXuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:mime-version:message-id:date; bh=TTCKXZ34DG5IVgg2Mox0sye2TV/KwOiPrvLHXaF6NRQ=; b=1C/38RmFsLEEaPttc5vUw6+DV5k5QicDTzeWLDpVqiatXdOgoLU9l2ZBPISPkgrA20 SIIJVPTQcXsxe8N6CXDItsq9048urPy4CM+uN4tofZfM3JcARU7ymnVEW1gi3LvpqllS nAU7DMo32JOlPiEsbVRQueFeIMbA6XHU6RtLC/tWbG+9m3uPKx6jaX0KjVdBmc9LyJSs Aute//GQQAgygs+NaYbBUeKp3oTy3gZnoOkT7k40iIBmDOtpQLFf/5aCUxWdpaxatdVh R5CTnZbYJ5iGPr4BxDSnAUlTgzpONwarqdaci0l99AAXAEhJtj7qyD5iyqtAqN8WjYAU u2Ug== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h14-20020a170902f54e00b00178b5e035fcsi12500424plf.496.2022.11.14.17.03.54; Mon, 14 Nov 2022 17:04:08 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=zte.com.cn Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236990AbiKOA67 (ORCPT <rfc822;zwp10758@gmail.com> + 99 others); Mon, 14 Nov 2022 19:58:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbiKOA65 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 14 Nov 2022 19:58:57 -0500 X-Greylist: delayed 667 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 14 Nov 2022 16:58:56 PST Received: from mxhk.zte.com.cn (mxhk.zte.com.cn [63.216.63.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 767FE63A5 for <linux-kernel@vger.kernel.org>; Mon, 14 Nov 2022 16:58:55 -0800 (PST) Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mxhk.zte.com.cn (FangMail) with ESMTPS id 4NB79B3NSRz8QrkZ; Tue, 15 Nov 2022 08:58:54 +0800 (CST) Received: from xaxapp01.zte.com.cn ([10.88.40.50]) by mse-fl1.zte.com.cn with SMTP id 2AF0woFW074233; Tue, 15 Nov 2022 08:58:50 +0800 (+08) (envelope-from guo.ziliang@zte.com.cn) Received: from mapi (xaxapp03[null]) by mapi (Zmail) with MAPI id mid32; Tue, 15 Nov 2022 08:58:51 +0800 (CST) Date: Tue, 15 Nov 2022 08:58:51 +0800 (CST) X-Zmail-TransId: 2afb6372e44bffffffff940df1c2 X-Mailer: Zmail v1.0 Message-ID: <202211150858513761518@zte.com.cn> Mime-Version: 1.0 From: <guo.ziliang@zte.com.cn> To: <pbonzini@redhat.com> Cc: <kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: =?utf-8?q?=5BPATCH_linux-next=5D_KVM=3A_replace_DEFINE=5FSIMPLE=5FA?= =?utf-8?q?TTRIBUTE_with_DEFINE=5FDEBUGFS=5FATTRIBUTE?= Content-Type: text/plain; charset="UTF-8" X-MAIL: mse-fl1.zte.com.cn 2AF0woFW074233 X-Fangmail-Gw-Spam-Type: 0 X-FangMail-Miltered: at cgslv5.04-192.168.250.137.novalocal with ID 6372E44E.000 by FangMail milter! X-FangMail-Envelope: 1668473934/4NB79B3NSRz8QrkZ/6372E44E.000/10.5.228.132/[10.5.228.132]/mse-fl1.zte.com.cn/<guo.ziliang@zte.com.cn> X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 6372E44E.000/4NB79B3NSRz8QrkZ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749522053434666311?= X-GMAIL-MSGID: =?utf-8?q?1749522053434666311?= |
Series |
[linux-next] KVM: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE
|
|
Commit Message
guo.ziliang@zte.com.cn
Nov. 15, 2022, 12:58 a.m. UTC
From: guo ziliang <guo.ziliang@zte.com.cn> Fix the following coccicheck warning: /virt/kvm/kvm_main.c: 3849: 0-23: WARNING: vcpu_get_pid_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE Signed-off-by: guo ziliang <guo.ziliang@zte.com.cn> --- virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.8.3.1
Comments
On Tue, Nov 15, 2022, guo.ziliang@zte.com.cn wrote: > From: guo ziliang <guo.ziliang@zte.com.cn> > Fix the following coccicheck warning: > /virt/kvm/kvm_main.c: 3849: 0-23: WARNING: vcpu_get_pid_fops > should be defined with DEFINE_DEBUGFS_ATTRIBUTE > > Signed-off-by: guo ziliang <guo.ziliang@zte.com.cn> > --- > virt/kvm/kvm_main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > index 2719e10..6e58aec 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -3846,7 +3846,7 @@ static int vcpu_get_pid(void *data, u64 *val) > return 0; > } > > -DEFINE_SIMPLE_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n"); > ++DEFINE_DEBUGFS_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n"); NAK, third time is not a charm. https://lore.kernel.org/all/20221101072506.7307-1-liubo03@inspur.com https://lore.kernel.org/all/20220815031228.64126-1-ye.xingchen@zte.com.cn
On 11/15/22 18:31, Sean Christopherson wrote: > On Tue, Nov 15, 2022, guo.ziliang@zte.com.cn wrote: >> From: guo ziliang <guo.ziliang@zte.com.cn> >> Fix the following coccicheck warning: >> /virt/kvm/kvm_main.c: 3849: 0-23: WARNING: vcpu_get_pid_fops >> should be defined with DEFINE_DEBUGFS_ATTRIBUTE >> >> Signed-off-by: guo ziliang <guo.ziliang@zte.com.cn> >> --- >> virt/kvm/kvm_main.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c >> index 2719e10..6e58aec 100644 >> --- a/virt/kvm/kvm_main.c >> +++ b/virt/kvm/kvm_main.c >> @@ -3846,7 +3846,7 @@ static int vcpu_get_pid(void *data, u64 *val) >> return 0; >> } >> >> -DEFINE_SIMPLE_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n"); >> ++DEFINE_DEBUGFS_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n"); > > NAK, third time is not a charm. > > https://lore.kernel.org/all/20221101072506.7307-1-liubo03@inspur.com > https://lore.kernel.org/all/20220815031228.64126-1-ye.xingchen@zte.com.cn Screw it, I'm going to send a pull request just to delete that file. Paolo
On Tue, Nov 15, 2022, Paolo Bonzini wrote: > On 11/15/22 18:31, Sean Christopherson wrote: > > On Tue, Nov 15, 2022, guo.ziliang@zte.com.cn wrote: > > > From: guo ziliang <guo.ziliang@zte.com.cn> > > > Fix the following coccicheck warning: > > > /virt/kvm/kvm_main.c: 3849: 0-23: WARNING: vcpu_get_pid_fops > > > should be defined with DEFINE_DEBUGFS_ATTRIBUTE > > > > > > Signed-off-by: guo ziliang <guo.ziliang@zte.com.cn> > > > --- > > > virt/kvm/kvm_main.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c > > > index 2719e10..6e58aec 100644 > > > --- a/virt/kvm/kvm_main.c > > > +++ b/virt/kvm/kvm_main.c > > > @@ -3846,7 +3846,7 @@ static int vcpu_get_pid(void *data, u64 *val) > > > return 0; > > > } > > > > > > -DEFINE_SIMPLE_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n"); > > > ++DEFINE_DEBUGFS_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n"); > > > > NAK, third time is not a charm. > > > > https://lore.kernel.org/all/20221101072506.7307-1-liubo03@inspur.com > > https://lore.kernel.org/all/20220815031228.64126-1-ye.xingchen@zte.com.cn > > Screw it, I'm going to send a pull request just to delete that file. Heh, I was seriously considering sending a patch to do that too.
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 2719e10..6e58aec 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -3846,7 +3846,7 @@ static int vcpu_get_pid(void *data, u64 *val) return 0; } -DEFINE_SIMPLE_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n"); ++DEFINE_DEBUGFS_ATTRIBUTE(vcpu_get_pid_fops, vcpu_get_pid, NULL, "%llu\n"); static void kvm_create_vcpu_debugfs(struct kvm_vcpu *vcpu) {