Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2487377rda; Wed, 25 Oct 2023 04:24:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGvInB1YASkpTyAOJC/zeQvBynXoluDdvBDJvEZAuLLGSFe/flo8HS5vFS+DyyKfkGkRO8 X-Received: by 2002:a05:690c:fd6:b0:5a7:f263:6873 with SMTP id dg22-20020a05690c0fd600b005a7f2636873mr18525485ywb.20.1698233097140; Wed, 25 Oct 2023 04:24:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698233097; cv=none; d=google.com; s=arc-20160816; b=A0pHoY/ClpJEZCAkUPJeUYBj2UKpQYMeuS+Gw+VbO/74IRx/+5LEZIpVyIKnkPotgh L1SNSECECWg97/R7SOgplFl2NbQjdBy4O+PRC2YlmaxaSpzG/902aBojn6Eb2PicfnNX G1iD5tZ5YSd7/3F3eZuhNJ3j8UbqGEHWvvnhQwWYfDyCOxMEdx0YwHoXOY/3rfX0zSf1 fp4mvLHVSjU7lSVRql9/LolXCxla5JGGIwYHmulcSLOXHXZEt4xtz0Yh47OpkiS0dZK3 CG/d880EfbUSOXILCEYuaxjNChqVdZSya/t4JCt3FE+q/o58W2Teh8MYAgJHZ/qPzmlz /sig== 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=z8Z+tYRzui7BaJuiaZnyDHDcWrbR6sR0khHhdgWMTK0=; fh=hsHp22AfiLBsuGYL8bpQkW/WbFNRnOfGyESGEJMdLng=; b=xaeXc2AkNPaSja0LUcRkms6VjLbVpaD+OLQxERHDf6acGBXSnqq1zQLuiBbjeiOsuN 5Y6gtmlM+1kLtsEjnO9E8U17n3OWWeUv3UepSVFEUUQ/cPgt55Atv+91/L/5D/8cdweO WnBrkMt+0iZnrNPtKgoBB0MhBK771mQsjWojIGljl1TCDriYHD7QoI1oM2GalSJoMb90 pERTvo/uAe/YFOcgOXMnXBaGo3uFFl0fio0OwOz7f+VLsSqw4YyoRHqyoO0UPjTd8gyY yTvNAp/cifTRAI61UQ9iHKsOpKRv0cXpnGxzvzLQ86wUhWq6wpX3+PcS9GyNcn9E7uJj Rj4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Uogu5R6N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id j67-20020a0de046000000b0058dedc2af66si10753071ywe.521.2023.10.25.04.24.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 04:24:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Uogu5R6N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 8C8CE80E73E5; Wed, 25 Oct 2023 04:24:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234017AbjJYLYq (ORCPT + 99 others); Wed, 25 Oct 2023 07:24:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230217AbjJYLYp (ORCPT ); Wed, 25 Oct 2023 07:24:45 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69B6AE8; Wed, 25 Oct 2023 04:24:43 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-27d4b280e4eso604856a91.1; Wed, 25 Oct 2023 04:24:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698233083; x=1698837883; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=z8Z+tYRzui7BaJuiaZnyDHDcWrbR6sR0khHhdgWMTK0=; b=Uogu5R6NiorHh7DCI/9zY4nv8zOLuluoQ0guDV3Ozy46RTj6zOp/EP+vYbK6JDBsg3 BeI2yJE1IgHX3OHQvwrV9rKPU6dt3Ez/zwifapxw1882oiUr6DLRwpgpmJ28XG5OyVDA HZWBagVbnqjc38osyGP/6kVQgG4fKEZXUBTlpYm1vfJxu/uzZQFLFfcu4BkJix1NERqo r3MkV691EayVYjeEOh9gdNPkFzBY4iKTxgBPUKNFKAMsCVr6BeLe8bow/4q1eh3tLbil RoBPOrwznvEE3OEMv+NCc/Ku/GTRUkJTw++B8rg5NIf6UpeLAz2hL/3x8skCPOQfg6E2 sDBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698233083; x=1698837883; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=z8Z+tYRzui7BaJuiaZnyDHDcWrbR6sR0khHhdgWMTK0=; b=p2aUdiaKSqgc/jKil3caX0mSoRw8hHP258N8p6+Qef/IaRzjZ19d/kxRIPO68hcMCF Gp4Fu9HVEc0kNifBUMY8urUZSQyzlzzJYK3BPLBcGIO/VAImiWyMdJBuUaZJ1vfjC8j7 JbnzhGgR806vizM/PNeGEj85z3KMJRkukiCyU91DblX1/AV2/Y2sre4ph4fQOycKzXX/ z7TuZ7N91yZo2lEH2/he8tpi6fpt7qmDLU6RR9So4x+MthLgTr1h3pk11CsObq4p+AN1 rPnU93W0mnDC/L/6CVOf+SHxUYOrtbRAF1QaiFDtU6O90S36i4ZjkO5aH2KHjWo4ccRs 5THQ== X-Gm-Message-State: AOJu0Yw+uKxbo1uA32f2CK6zpMBFrP+rOy/ESRDw5ySpUyY+lafKmJCI Lzlk/urzrokaLuCEp3Jqviw= X-Received: by 2002:a17:90b:8c:b0:27d:1aa:32b8 with SMTP id bb12-20020a17090b008c00b0027d01aa32b8mr24636071pjb.9.1698233082761; Wed, 25 Oct 2023 04:24:42 -0700 (PDT) Received: from [192.168.255.10] ([103.7.29.32]) by smtp.gmail.com with ESMTPSA id k5-20020a17090a7f0500b00267b38f5e13sm8545467pjl.2.2023.10.25.04.24.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 25 Oct 2023 04:24:42 -0700 (PDT) Message-ID: <53d7caba-8b00-42ab-849a-d8c8d94aea37@gmail.com> Date: Wed, 25 Oct 2023 19:24:36 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] KVM: x86/xsave: Remove 'return void' expression for 'void function' Content-Language: en-US To: Sean Christopherson Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Maxim Levitsky References: <20231007064019.17472-1-likexu@tencent.com> From: Like Xu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 25 Oct 2023 04:24:55 -0700 (PDT) Emm, did we miss this little fix ? On 11/10/2023 12:12 am, Maxim Levitsky wrote: > У сб, 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 >