Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp251864rdg; Tue, 10 Oct 2023 09:13:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+KPq8zcwEiycyGMiGW7u1AOxn1KUHhn0RMm6DE32H8dRtewYM7HkPB1QFeGgGHJhDCklF X-Received: by 2002:a05:6808:128a:b0:3ae:4cad:91a0 with SMTP id a10-20020a056808128a00b003ae4cad91a0mr24860780oiw.6.1696954415415; Tue, 10 Oct 2023 09:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696954415; cv=none; d=google.com; s=arc-20160816; b=Qdxa0olW9B2wM7l+XYSjGQo19q7vjl+TNhH5+wOIo8JXyzRuejWNlXEeLFWITJnuCK Vkz3csNw2102z2TudXnL29aacm6CgqALl04CdJ9JJ4QyeTjJzt5FCsqgUGuYYwoAguw6 8Qzid77E1INtNzCz+vE3q598jK3qrWo7CJgklrCYpkynYVQeP+C5qA3ZBjQArJ5KQfZL tGxbzit+wpnJ/3WM1fhJuePlSr5ZxJmJpIc6MrVOm8esJ4kl7nUo6FMRm3uhuAJnse33 Fi4alvlbpDpp4YbceTVEvZFLAFdpTDyQ/u0gZouSgGz9KMY9WIAMchrj2ZwerCmU9SZa 9BMg== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=HwWBmshMoiCixnS99NmNTL6QgwlkX3WoE8OY6VxV+Dc=; fh=zvvFP9/iK8ygeLxjEmFl/InvkyVmLRetSe/RrFhodDo=; b=EG7xp8PUyRvKzNrDIugYOQApTqo8M4n4HieTaYWOqFfr6hQ0Mdnb+xrM2OlCkEJRhC siV2hj6f22dyVy/s1y3oFXbW1XZN59VqNb7i/5SbUyTIXzQ8wDWShlA+SJRaS+u0xZiY 7B6KTO3mGFclwCpoor0OfdbHmn/Pk9dA9mga/hT6yBYrXFX2kDHn76PCGHlK1YmzdTiW Fy7aGLIGDhLNstMZUkTTAnw1b4xwnXDGQprLuPLvfS7kQyeQeoFZLSDnT0JBLl3CGPMF 4o5HLf0WpRrMrFb+n4jcIG6GkNskjx6foN4Ba6VZt/7spxsC0kp9dkIomzeGerWHEoiC j/jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OShGrNw4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id f20-20020a63f114000000b005644a9be955si12072830pgi.179.2023.10.10.09.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 09:13:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OShGrNw4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id EDB4B80ACCC9; Tue, 10 Oct 2023 09:13:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233689AbjJJQNY (ORCPT + 99 others); Tue, 10 Oct 2023 12:13:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231953AbjJJQNX (ORCPT ); Tue, 10 Oct 2023 12:13:23 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF84BB6 for ; Tue, 10 Oct 2023 09:12:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696954355; 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=HwWBmshMoiCixnS99NmNTL6QgwlkX3WoE8OY6VxV+Dc=; b=OShGrNw4v6m/0y6YNHO24dhkxs9gQxHqj3TQjFDbE3zgTpYZS7E78fPVjQepb7VQSGI2iE jW0a3ZbipjfugtQ1b2o6+m52eMSE+SKASWIUpach60+U7qiC285blpVxObZ2S+I6FHB0Wc 0BNO6mxpnzZhyqPpFIGMhEPQua69GkA= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-31-KVsebjJPNZ299DwP4N7h3A-1; Tue, 10 Oct 2023 12:12:29 -0400 X-MC-Unique: KVsebjJPNZ299DwP4N7h3A-1 Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-3247f646affso2728660f8f.1 for ; Tue, 10 Oct 2023 09:12:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696954348; x=1697559148; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=HwWBmshMoiCixnS99NmNTL6QgwlkX3WoE8OY6VxV+Dc=; b=dQsBaNDKhvPGDj84AlRRVsw+3UBLfl67ESgmCS8vbgZyCsU/JIBaMfRQVFcD8Il3QC r+R2F18iS26BNZPIgCoB6Q7gixLAgjMpIM7KIOUXs3SNldrY6hnhkmj4gCeZ4ZLclPwt KKreEp6IO1Hxp+L3o/TijOw26Iw268wShVhPEKiAX9+etKZ/0Bc1SBy1YWv4F8dWQaZ9 EcPLY73ievoU0u0AADNTtcqfJSdy5F7etN70zXAR437JvcJ6Y6z2q/ocP69sLqJX9FfB U3x9l8lxds6gHbDUNma7PxhvM307BK9QGOJYQ66OuhmKfXoFJhmSUc8PpFQquz0L7aVf pvVg== X-Gm-Message-State: AOJu0Yy7tJWYXEFP9Nnzyiod7TjrMhwiLBJ8D5B33S3WTWYPLKR9vGN3 gc1bYj277ALhjx56LGs+5qKPTvuaev1GSB7CrC71xKXNNthwaYcmk6/SfiWUD8kDPanXp4f6UMe hB50uGM+Xvw2RclJlISvfje91 X-Received: by 2002:a05:6000:243:b0:329:6b53:e3ad with SMTP id m3-20020a056000024300b003296b53e3admr10803404wrz.34.1696954348427; Tue, 10 Oct 2023 09:12:28 -0700 (PDT) X-Received: by 2002:a05:6000:243:b0:329:6b53:e3ad with SMTP id m3-20020a056000024300b003296b53e3admr10803382wrz.34.1696954348022; Tue, 10 Oct 2023 09:12:28 -0700 (PDT) Received: from starship ([89.237.100.246]) by smtp.gmail.com with ESMTPSA id f23-20020a7bc8d7000000b003fe1c332810sm16769821wml.33.2023.10.10.09.12.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 09:12:27 -0700 (PDT) Message-ID: Subject: Re: [PATCH] KVM: x86/xsave: Remove 'return void' expression for 'void function' From: Maxim Levitsky To: Like Xu , Sean Christopherson Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 10 Oct 2023 19:12:26 +0300 In-Reply-To: <20231007064019.17472-1-likexu@tencent.com> References: <20231007064019.17472-1-likexu@tencent.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,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 agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 10 Oct 2023 09:13:33 -0700 (PDT) X-Spam-Level: ** У сб, 2023-10-07 у 14:40 +0800, Like Xu пише: > From: Like Xu > > The requested info will be stored in 'guest_xsave->region' referenced by > the incoming pointer "struct kvm_xsave *guest_xsave", thus there is no need > to explicitly use return void expression for a void function "static void > kvm_vcpu_ioctl_x86_get_xsave(...)". The issue is caught with [-Wpedantic]. > > Fixes: 2d287ec65e79 ("x86/fpu: Allow caller to constrain xfeatures when copying to uabi buffer") > Signed-off-by: Like Xu > --- > arch/x86/kvm/x86.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index fdb2b0e61c43..2571466a317f 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -5503,8 +5503,8 @@ static void kvm_vcpu_ioctl_x86_get_xsave2(struct kvm_vcpu *vcpu, > static void kvm_vcpu_ioctl_x86_get_xsave(struct kvm_vcpu *vcpu, > struct kvm_xsave *guest_xsave) > { > - return kvm_vcpu_ioctl_x86_get_xsave2(vcpu, (void *)guest_xsave->region, > - sizeof(guest_xsave->region)); > + kvm_vcpu_ioctl_x86_get_xsave2(vcpu, (void *)guest_xsave->region, > + sizeof(guest_xsave->region)); > } > > static int kvm_vcpu_ioctl_x86_set_xsave(struct kvm_vcpu *vcpu, > > base-commit: 86701e115030e020a052216baa942e8547e0b487 Reviewed-by: Maxim Levitsky Best regards, Maxim Levitsky