From patchwork Tue Dec 13 08:02:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li kunyu X-Patchwork-Id: 32669 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2695984wrr; Tue, 13 Dec 2022 00:08:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf7z4uzkECi/LDqbwcSQldg46VGFsZ3rPFGKKH89Lktq8je/fSDMs+I3b2D8lSCRNfSIcyfH X-Received: by 2002:a05:6402:540b:b0:461:75f1:9254 with SMTP id ev11-20020a056402540b00b0046175f19254mr16513360edb.2.1670918883496; Tue, 13 Dec 2022 00:08:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670918883; cv=none; d=google.com; s=arc-20160816; b=w5Y4REhFayicmyOcZS1bRvGWYS7G52o8B2PGN65XrTfeZwN63rWFFKFvb/+6QcZ4pa ROfPoRBChlEp3O0Mp5Z3X7VBpbg8v1uPD8RuM13ADiSX8SimWzPVV8ycSOLTSECghVjE XD9hBOuYkmqHktn/jUnzpiMn2XJs+NsZkVjnL82rWe/xG5j6zSCsxdvmqQLOotjdRA+K wkgkWZpHub5rBPRLztZCrHRWumMkQvBo6Ipka24u7OvFLJhUw3PbaWFXMyA0eKBlAbg/ 5OQ8tDImZSn15Ir1+Ks8gH6fsuKNGJjjfeHp3XYmJaBEkNRptCx1QjFiaulbFGErzPVd FAMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=nrPSwYYZyGy4oWuk3KolzI+otwQUrdclauJY2V2g5ko=; b=cRnAFF8GHdk5m55LoajBBWV91WuenHTQP6ZJkxTeP/DcL4NlihfBwKonTFuz+lwefg RFRPU/OVACl2lQdUBVNm3J+04sZrxDS4HYja4LwIQbdwN3DZSsQ45iQ8cuKw0YTR1D4I CJryUlR0Bg4ebXH2BaUoP6QQSWNWZIdm4d3qcnDn+soAt6c8MO3SEPjOVGWAc8PVJVY8 RtiwgN5tr/yzsPOyTl7bh6u6SCmQJYE5AtYa4yaHDVVR0lBVpJMLq1nEvH23PWUuHZM8 yTFDz86cQBboGx3V1GhFAtXJ3oaaMkSXUsF5U3qPGYWN1aRlUpunJHZY6ayV5GY5iFxs FREw== 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 c16-20020aa7df10000000b0046c33d9ea8csi8177439edy.599.2022.12.13.00.07.39; Tue, 13 Dec 2022 00:08:03 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234555AbiLMICw (ORCPT + 99 others); Tue, 13 Dec 2022 03:02:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234440AbiLMICp (ORCPT ); Tue, 13 Dec 2022 03:02:45 -0500 Received: from mail.nfschina.com (mail.nfschina.com [124.16.136.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8D6DB1128; Tue, 13 Dec 2022 00:02:42 -0800 (PST) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 173ED1E80D9B; Tue, 13 Dec 2022 15:58:03 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rfiRxksORkZZ; Tue, 13 Dec 2022 15:58:00 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: kunyu@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 25CDF1E80D56; Tue, 13 Dec 2022 15:58:00 +0800 (CST) From: Li kunyu To: pbonzini@redhat.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Li kunyu Subject: [PATCH] kvm: kvm_main: Remove unnecessary (void*) conversions Date: Tue, 13 Dec 2022 16:02:36 +0800 Message-Id: <20221213080236.3969-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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?1752085439377209473?= X-GMAIL-MSGID: =?utf-8?q?1752085439377209473?= void * pointer assignment does not require a forced replacement. Signed-off-by: Li kunyu --- virt/kvm/kvm_main.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index fab4d3790578..1682b269ad4a 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -3861,7 +3861,7 @@ static int create_vcpu_fd(struct kvm_vcpu *vcpu) #ifdef __KVM_HAVE_ARCH_VCPU_DEBUGFS static int vcpu_get_pid(void *data, u64 *val) { - struct kvm_vcpu *vcpu = (struct kvm_vcpu *) data; + struct kvm_vcpu *vcpu = data; *val = pid_nr(rcu_access_pointer(vcpu->pid)); return 0; } @@ -5445,8 +5445,7 @@ static int kvm_debugfs_open(struct inode *inode, struct file *file, const char *fmt) { int ret; - struct kvm_stat_data *stat_data = (struct kvm_stat_data *) - inode->i_private; + struct kvm_stat_data *stat_data = inode->i_private; /* * The debugfs files are a reference to the kvm struct which @@ -5467,8 +5466,7 @@ static int kvm_debugfs_open(struct inode *inode, struct file *file, static int kvm_debugfs_release(struct inode *inode, struct file *file) { - struct kvm_stat_data *stat_data = (struct kvm_stat_data *) - inode->i_private; + struct kvm_stat_data *stat_data = inode->i_private; simple_attr_release(inode, file); kvm_put_kvm(stat_data->kvm); @@ -5517,7 +5515,7 @@ static int kvm_clear_stat_per_vcpu(struct kvm *kvm, size_t offset) static int kvm_stat_data_get(void *data, u64 *val) { int r = -EFAULT; - struct kvm_stat_data *stat_data = (struct kvm_stat_data *)data; + struct kvm_stat_data *stat_data = data; switch (stat_data->kind) { case KVM_STAT_VM: @@ -5536,7 +5534,7 @@ static int kvm_stat_data_get(void *data, u64 *val) static int kvm_stat_data_clear(void *data, u64 val) { int r = -EFAULT; - struct kvm_stat_data *stat_data = (struct kvm_stat_data *)data; + struct kvm_stat_data *stat_data = data; if (val) return -EINVAL;