Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4639759pxb; Tue, 25 Jan 2022 15:12:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJzG5tx2CV0KtYLs+k0tJGc1ghDFMX+uXEJQT+RPSIIsj272KRrvH8wfsM/22jSU6pQuQ0wu X-Received: by 2002:a63:69c8:: with SMTP id e191mr16600305pgc.523.1643152361315; Tue, 25 Jan 2022 15:12:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643152361; cv=none; d=google.com; s=arc-20160816; b=x4k8z0HvHakx2WpOTVNjuttJOWXt9ZNs1GCjqOpr0hfVGj9Fgq7HjGxfdKa3aNZrOZ dc245/3F+WE/BcZREJy0f5DKH8FVKKl1cDQ/EsIY9BJZKAxedR0lUcqOUCsl+X6M8oc6 GexNR8yGeh28Pt2IujyZpJOfv3vlyp2g+PEE3CkRkSA6oqV/4qlSGFvlE+bAxMfhlqv0 3rI+50clpbyOv3iILIVMthX3LmSc4EimpOhmgntpmj6nROhccA22BimeaEvjzIlk3gKQ SAs9yjrk68A93XRYf1IjEHeQvjUqiX8tk1IfvBUIOEP8rzFlxrkPnfMJ1mwjWAbGGmbC oxMA== 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=ReaBFbcLhGuXS2ueJc4WerhmCTBoSrJa8O+uDsGwdwU=; b=ho97198I0ji3567rZyD6TWpNhFLyU9EA1PPkf27IifM34+qBYAgVo8dlEhPwSf4TUc 0NtI0jqbpKxtt49CvpXXJbwoSVIKIrpEYIrQ0J6Dq9Y1FiY+8fxDCZ6cjjZqxIGe57H0 Al4SAk5Pfq+0smAe7S8LY1UV84ShofOwnrZMEJw2JNwRXNcmFgN8PDFExP1ClzK+Y8mM S3chaWuUhOC+A1ApS0P+UoViYvIz22XxJBykQWGXTrcJp4AC7Ih/zEa+lBHb/qZhQiCF Rbi4K0CcVv89X+2lwttsX2jvEIsiLKFoGDDBeg5jyfRCMLioxYjrh3R+aICwSemsEWuG eU6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DUjzoNQL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e123si127183pfe.248.2022.01.25.15.12.28; Tue, 25 Jan 2022 15:12:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DUjzoNQL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350816AbiAYQfd (ORCPT + 99 others); Tue, 25 Jan 2022 11:35:33 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:27401 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1453897AbiAYQbM (ORCPT ); Tue, 25 Jan 2022 11:31:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643128271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ReaBFbcLhGuXS2ueJc4WerhmCTBoSrJa8O+uDsGwdwU=; b=DUjzoNQLvTr9EuzR426/7cCvOxZfjOHfd1iZswoUj5o6CoRc8rw31vznHUD8z/Ak+2g6bG /4UaOyDyHPH98LE1lbecR55iDgU6AfSD2zkiguommTHQW0CGk+cN+w++VE/fppC7lNo+nh oI9K5kGiwqAAhoewMC5SngRXLPsTzec= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-658-dkgMvb2dOxSDmFANXlWRqg-1; Tue, 25 Jan 2022 11:31:09 -0500 X-MC-Unique: dkgMvb2dOxSDmFANXlWRqg-1 Received: by mail-ed1-f72.google.com with SMTP id el8-20020a056402360800b00403bbdcef64so15300610edb.14 for ; Tue, 25 Jan 2022 08:31:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=ReaBFbcLhGuXS2ueJc4WerhmCTBoSrJa8O+uDsGwdwU=; b=IzUaVVyQeXFGnzqFd78afnr7G370C0Ij/Xeyy19QBkaQhDOrZhQC1elY3XETX3VyLM OIn3fQ8FSkJpGpPvOcEG1y0RgS8OF+PXOwgS6nnNTgmBm8LY7hRcmT5T/wjpE/jXoArg vvcYm2P0jJhSxOBl9avqGlHTyORsJVcoQ1+wCsMaT7Q4ZFZX6pft/touzA+F2mv8otK9 E6ZmOx9FeS38wuQEWpQ5ogd6PThReLDySiCxhrq7v3bl5sc5PMwZ1KpQjEKbFVro7IJw xyj4/FICTmu3y4MIA0GTQPIfl0S0Elxa74LhJaQQq4I8X63LQkVj95Z287eNvWRFaW1C fYCQ== X-Gm-Message-State: AOAM531T9xHHMtYTzHSQVD8zWNL0zGTj19C2b1xdXOM5Xm6hfOl8ylKh 6sE32nyG8yM28KiPD+sWDSpRnyhy2gUyOQ7pme2KI2qUH9SEpE/snv0v+IVb5wVdfs7MdWal/kz 24ko0VY53UmabNRi2tJgyXJit X-Received: by 2002:a17:907:97c3:: with SMTP id js3mr3245508ejc.117.1643128268320; Tue, 25 Jan 2022 08:31:08 -0800 (PST) X-Received: by 2002:a17:907:97c3:: with SMTP id js3mr3245486ejc.117.1643128268135; Tue, 25 Jan 2022 08:31:08 -0800 (PST) Received: from ?IPV6:2001:b07:6468:f312:c8dd:75d4:99ab:290a? ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.googlemail.com with ESMTPSA id h19sm2158726edv.90.2022.01.25.08.31.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Jan 2022 08:31:07 -0800 (PST) Message-ID: <5c5e274f-a09c-8a90-f7b1-51f969dd4c2d@redhat.com> Date: Tue, 25 Jan 2022 17:31:06 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH 16/19] KVM: x86: Remove unused "vcpu" of kvm_arch_tsc_has_attr() Content-Language: en-US To: Jinrong Liang Cc: Xianting Tian , Jim Mattson , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220125095909.38122-1-cloudliang@tencent.com> <20220125095909.38122-17-cloudliang@tencent.com> From: Paolo Bonzini In-Reply-To: <20220125095909.38122-17-cloudliang@tencent.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/25/22 10:59, Jinrong Liang wrote: > From: Jinrong Liang > > The "struct kvm_vcpu *vcpu" parameter of kvm_arch_tsc_has_attr() > is not used, so remove it. No functional change intended. > > Signed-off-by: Jinrong Liang > --- > arch/x86/kvm/x86.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index df46d0737b85..22b73b918884 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -5003,8 +5003,7 @@ static int kvm_set_guest_paused(struct kvm_vcpu *vcpu) > return 0; > } > > -static int kvm_arch_tsc_has_attr(struct kvm_vcpu *vcpu, > - struct kvm_device_attr *attr) > +static int kvm_arch_tsc_has_attr(struct kvm_device_attr *attr) > { > int r; > > @@ -5099,7 +5098,7 @@ static int kvm_vcpu_ioctl_device_attr(struct kvm_vcpu *vcpu, > > switch (ioctl) { > case KVM_HAS_DEVICE_ATTR: > - r = kvm_arch_tsc_has_attr(vcpu, &attr); > + r = kvm_arch_tsc_has_attr(&attr); > break; > case KVM_GET_DEVICE_ATTR: > r = kvm_arch_tsc_get_attr(vcpu, &attr); I can't make my mind on this. I think it's better to have the argument in case some attributes depend on VM capabilities in the future. Paolo