Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp814155rdb; Fri, 6 Oct 2023 23:40:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHYrtH2SJ4t0qJJK65rhG/NG1h1PV8JHlNwJl+snnggkwozk+phUmJN8grbT/O1dGpnrbli X-Received: by 2002:a05:6a20:f3b0:b0:15e:9c2f:5294 with SMTP id qr48-20020a056a20f3b000b0015e9c2f5294mr8824932pzb.56.1696660853932; Fri, 06 Oct 2023 23:40:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696660853; cv=none; d=google.com; s=arc-20160816; b=g4kNCkBKWQn6fOcsw2wkUOahEGseAxUW1ga4p2EicjTCj2mQGNtXtiRJYuO7YJx8zY HVVqKS4g0JPrZ3jNX7KlCNDOJFsg7CnaGS5AY2nXPQbtHVNR0D1eelw5rirbP2fjzyTX 8OF/lCxBN7VHVQZcElm0r7TV4Cdlkf1bOt7nx1PPRS6PXcVicwA2ErW6cwWdLKXkcKV2 xxa58W9/DzfbfEVooeI698r4OnuwLg8gXwYYJvkT+VMFz8oc1Vn0hVAXUoAY55QZo1w3 IvPG2eBNMZ+DUKeRTY8ztDXMrun7w1TkATvEUYTE7UkJMdcvBPhAcGuXPKPwiWCoDOlm K84Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=rPnJf4ACBTqap66/DGz7muRwHc2NwgeM+41OMr/ru4M=; fh=IczE/FYqinQ7k7O3D1SswHC93QrfXqbblVYzr34TRlc=; b=tqN5d0/Xn0CArgUj3gLnNgUyBIfSYQb63EzOgLBaSGQ8vsgGUdEo1cP+boWIqghNb0 Mx2DenUl1IyymzKUHruGiJVAhbyME0CmY0igHN+fHh8+qW4tpf2YN+ZnypRjUKlMZoRk gXWAK4XwfEINJCSyIVYfxSWtTxcX9p8hauMi+GZD6SpQLP3J0LXescPzEtng/E105rpl lBmfeBQR6CHNDNwHHwpGVgltmX6I/wn9cAhqH1GyfXAR14v2Wa3CzMkm80wdk2p4OobW 1BPcJqWQ4BB+24uJN7jqn9msNd5wg8gTu88bWHv/OoWB4c0mQ9+yLpKf6MfVzAhRBHNb 0PGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bQfkyF7w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id h11-20020a170902f2cb00b001c2109a8576si4957769plc.652.2023.10.06.23.40.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 23:40:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=bQfkyF7w; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 781DE81C8D85; Fri, 6 Oct 2023 23:40:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343591AbjJGGkl (ORCPT + 99 others); Sat, 7 Oct 2023 02:40:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343561AbjJGGkk (ORCPT ); Sat, 7 Oct 2023 02:40:40 -0400 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50746BD; Fri, 6 Oct 2023 23:40:39 -0700 (PDT) Received: by mail-ot1-x330.google.com with SMTP id 46e09a7af769-6bd04558784so1976186a34.3; Fri, 06 Oct 2023 23:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696660838; x=1697265638; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rPnJf4ACBTqap66/DGz7muRwHc2NwgeM+41OMr/ru4M=; b=bQfkyF7wdqoHllWwFf742p6lmaT/AbwN0xNVCZ8a+dMSgqFsuhKy0LVRzhS/o3bl6k 8oUFgkCkdEVgggb2yRORnQHMnMRP0/rrLBw2ZJ8pXU2F0Jlc6quP3kC+pEorqiqF7iGx TuEFx3DhcTWU7XhC5JGJ9NYoVUBsCQpWWWqPsgScaGwHej+OyJc8QuqRqck/N0WXC5Wj jR1E6ureAr03l1ByIhxZ3rc+RBI7Oa/Id74emQ6oZ7SL5KhFMhPtnMG9AauloIjwHxuT VBd1r5183VU/xP+J2zGgGaf8BG+6O6XqJ4f1KFusdAnMRDNRlSMtykFs49fauc7qCcnx dhdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696660838; x=1697265638; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=rPnJf4ACBTqap66/DGz7muRwHc2NwgeM+41OMr/ru4M=; b=MeilnNx9Tb2Z5ued6p7b4stVjkFqDGi2xCZzfPZfLOSrJ186cywcjQQhp+UhI6O7LK XXD/is/uOONJHQUF7ctUEGhAa2zvudfEOQXL4A63DjrTIOvY61KTy0YMw4ii7Mruecm0 XJyBIYQjnhQnTakrPA3qDN0KO7u3P/E9IaysO8mSxyGPNV4n/F5YAb0CcbNTbC97IneN OVkCgEdQQgzKqNM4ZxKMSUqdHpsK2oQmlJOq+1eybTpNieTKx/cxo7lPJVyk1PPKNmvx gh8FT6wKI5cWgw6Cv2w4o0frYPl4SmnSEHbDGLqn3aD1rCUrZURS35Ht0NknBOrUPa8/ KXcQ== X-Gm-Message-State: AOJu0YzT/R5jnNBBvw8EwmAdDm9Cw5g50ON8eXMVWzN+4Aj16M/wWeMq NHgEQS9GcyZcXS7UvCzMV58= X-Received: by 2002:a05:6870:9712:b0:1db:71b9:419c with SMTP id n18-20020a056870971200b001db71b9419cmr11905065oaq.58.1696660838560; Fri, 06 Oct 2023 23:40:38 -0700 (PDT) Received: from localhost.localdomain ([103.7.29.32]) by smtp.gmail.com with ESMTPSA id q25-20020a62e119000000b0069370f32688sm2506650pfh.194.2023.10.06.23.40.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 23:40:37 -0700 (PDT) From: Like Xu X-Google-Original-From: Like Xu To: Sean Christopherson Cc: Paolo Bonzini , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] KVM: x86/xsave: Remove 'return void' expression for 'void function' Date: Sat, 7 Oct 2023 14:40:19 +0800 Message-ID: <20231007064019.17472-1-likexu@tencent.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 pete.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 (pete.vger.email [0.0.0.0]); Fri, 06 Oct 2023 23:40:51 -0700 (PDT) X-Spam-Level: ** 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 -- 2.42.0