From patchwork Tue Nov 1 07:25:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bo Liu X-Patchwork-Id: 13541 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2794389wru; Tue, 1 Nov 2022 00:28:29 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5TEr+evwC7T6SeNtxl7pKE7sLW6oRDpiKhRpKkTvq125l7lJ9442B3saZ5y7ZuUMfUsRUp X-Received: by 2002:a17:90b:378f:b0:213:acf2:13ba with SMTP id mz15-20020a17090b378f00b00213acf213bamr17216538pjb.25.1667287708854; Tue, 01 Nov 2022 00:28:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667287708; cv=none; d=google.com; s=arc-20160816; b=uqXwkrfSvPouQ87PrL2NhZ//1/LHa3Ded4LFoomkf+hGBzmsDnfLRQ0yThk9FfqDn4 tszJRS4m1IEfuymy7viSrr6HzSS21WDlRMT9xWeDZqcV3Wg+BIOJF2eztc3pu80fVGKp eyi15rNXRrVa9fBQRrSM5N17KYskXWzL31Qboqyci5XC4PF3RhcVjI6pSTCEcHW4W65R YMJod69D4GqJe8he0UrPq3rYvwPllYqjEIEAuXU6IJhczpyJ0ExY6Imd4S//gjiELLHC sutyc5g8mBXuYkoY7bJtL9c7fGy099M6o1xIvGqZRF/Ib3zX7YeQJAAeqBGUOvM0Rm80 gMRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:abuse-reports-to:tuid:mime-version:message-id :date:subject:cc:to:from; bh=bo5593ksBwLCv2zf9X4AbIjBYbAiE+Ag71JyJPzt/7k=; b=mdKRUn4gbv7+AQE7CxfDXTmULTTzWu015u5mXjmH3nes5Hw8Fw7hZvijcTpG5I66kx RMNCBddqbYtp3N9bbqtO0gufzDP9BHI87n/MZG9jF1d07oXT+HjvgA/CaWOeimUac4XB eIhIeZQWsBiEi4gKc9tJxe6WekwZ/4ogSn/4Do17TAZ/Tl/UXQCgpM3ip/SS8BQ66Oay 4K4wkoo0YX8GiZj97bMhRH9Y2wMbUUin0fdAA2AVYS6tEUvmVw1GduCBevYQ7EG9lDcv ELOzAj9pNpThXF8YVb0hxp2dZGJDJmSCWgn5J2tybjH+mCISMqqNqPvpQYJFEgXB0F6g 5nPw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x185-20020a6386c2000000b0046fe1646542si3049825pgd.574.2022.11.01.00.28.15; Tue, 01 Nov 2022 00:28:28 -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; 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 S229779AbiKAHZR (ORCPT + 99 others); Tue, 1 Nov 2022 03:25:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbiKAHZP (ORCPT ); Tue, 1 Nov 2022 03:25:15 -0400 Received: from ssh248.corpemail.net (ssh248.corpemail.net [210.51.61.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB35213F9D; Tue, 1 Nov 2022 00:25:12 -0700 (PDT) Received: from ([60.208.111.195]) by ssh248.corpemail.net ((D)) with ASMTP (SSL) id VIA00106; Tue, 01 Nov 2022 15:25:06 +0800 Received: from localhost.localdomain (10.200.104.97) by jtjnmail201603.home.langchao.com (10.100.2.3) with Microsoft SMTP Server id 15.1.2507.12; Tue, 1 Nov 2022 15:25:07 +0800 From: Bo Liu To: CC: , , Bo Liu Subject: [PATCH] KVM: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE Date: Tue, 1 Nov 2022 03:25:06 -0400 Message-ID: <20221101072506.7307-1-liubo03@inspur.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Originating-IP: [10.200.104.97] tUid: 20221101152506542b37a066d351f49ca7da895e039e5a X-Abuse-Reports-To: service@corp-email.com Abuse-Reports-To: service@corp-email.com X-Complaints-To: service@corp-email.com X-Report-Abuse-To: service@corp-email.com X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748277876465658387?= X-GMAIL-MSGID: =?utf-8?q?1748277876465658387?= Fix the following coccicheck warning: virt/kvm/kvm_main.c:3847:0-23: WARNING vcpu_get_pid_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE Signed-off-by: Bo Liu --- 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 f1df24c2bc84..3f383f27d3d7 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -3844,7 +3844,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) {