Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp877260rwl; Thu, 10 Aug 2023 03:06:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFgVx84R7qbI0z00UKlaaMbIRm8xSSvMS3mXo/s8yH01tq1YkhGQnwTbZDgnvjOPncPOxA3 X-Received: by 2002:a05:6830:22f8:b0:6b9:c49f:1af7 with SMTP id t24-20020a05683022f800b006b9c49f1af7mr1762649otc.20.1691662006090; Thu, 10 Aug 2023 03:06:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691662006; cv=none; d=google.com; s=arc-20160816; b=BTJfEeNWhXjxFx5eXWPL2gFi2QJujYe8wIsXTmEdLlMjabEIFdF9MPT4yX+gUJaR73 H1D/lrF5G9vDBUUJ/fOd7jDLYcc55LoCvWOuICMkmN6UwH3I2+8HJtrNMJ7Zggdr8hdu gb4uV4Mx/qM9+XVVFBLJ9O9vuhX1/MV//dxYrtAX8TpRiKK4G/jQTExM8eQ+trRWnQ/H zxunpdbuEB7yTIV6kSHztrDRuE2rKnPBTXCMk52hxWLj1oJdvdcU4XvZsfNhbHjEsfUb y/9wYVNNGp3UP4uB/npO1xILGC8bDH+C622dAfYM917CvpQYTnA6AV9WraKD0Qo/PIRJ xT4A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/UWSTTF0t3sjG9vObIBOdAveTAVD8mKJIqcoJ5daziA=; fh=/iGrNW+RblIWj1LrqUEdrz6IGW99Ktsuyq3EPKx0UEk=; b=r/ShxDyEVcAlnu3HcQWXJ+iUU5TfDrDXjcXPjK6JyGzMp1seUFZR+U/w7C8Fu1jjXp NV3rIzGBUrjeZwzBbaHMyPjz8pfkHS4HF/Vd99p/VxXRrUAe4Giw+eC2h86XpXpTvQQR yX2ESJFimXLijDoFfsnmR11FNVxkt3v6Mw/1GgbIzrosm0OwtFI2kqz1fsXkxRxN/ZWh oBoAocRZQLO9m+FpQXotX3efk+3f0S4QKrFXCLMze/RTNAbvY57PEUGNso4ygnIsy7Nh /r4BqROFxmOPlv7IsqA97vBaDlXZ6tdtv6SY7Af2W4s+aOREzOTvHTBueQjhN1vMEgsd bC+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=bBWZ3k3L; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ca32-20020a056a0206a000b0056513361b55si1380098pgb.126.2023.08.10.03.06.30; Thu, 10 Aug 2023 03:06:46 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20221208 header.b=bBWZ3k3L; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234385AbjHJJKM (ORCPT + 99 others); Thu, 10 Aug 2023 05:10:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231948AbjHJJKK (ORCPT ); Thu, 10 Aug 2023 05:10:10 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64A092103; Thu, 10 Aug 2023 02:10:08 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id 98e67ed59e1d1-267fcd6985cso460890a91.2; Thu, 10 Aug 2023 02:10:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1691658608; x=1692263408; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/UWSTTF0t3sjG9vObIBOdAveTAVD8mKJIqcoJ5daziA=; b=bBWZ3k3LvxqFNCvuXrXWNymGyhzEQZm+pshphOBL6ASXMc8kO8xop/9Mbp1He5ufBv 3zFWrqYK/Wyj2qEu/usQUg1tyYaor+0ryXaQneuE4yxxpPCwXIixe43JhD1FT3XEqEQJ 5Y7YLG0RVwkJ70CnUzL01om+jGyGhGMoFqLHqdgz9s2/DLEX1rgTrZMQpIUN+U9DhLfC 0xt4AzsYxoX44r+MjKAECYRXopeieQg1ED2BirfcYtrzRavSsm8zUiVCWq0yu33w7MQn +EkexVreRotkSliBMub0ScirgGec75EnH1kgDYIRiev17EBbKlUQPUd98NdprJFnzfHm sUUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691658608; x=1692263408; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/UWSTTF0t3sjG9vObIBOdAveTAVD8mKJIqcoJ5daziA=; b=g6HU9ER68kKrjZowbe8ZZ/yQ0BpJTteU4U3TYzLDi1dPy2YGo2psluH7oBlr9Vo9FK qwbLZgnBWE2I7nhN//hTP2uzHuyYyJ+haIErr4nOP1OoaPvwa2Nn4Qq0bBfA37+Y2qv6 i2rooRom30iUeKh7/zGWMf7n+UMJdHl5CcOunRjAAsuZC7CqImXvpSb/ND7tolldhq2j qENPuT993zHNHze9R4A4rwV9iFNVYMX3xol2oK/Hh6ZRUtjLuWtXBkbCAT6hKL5bwoIC dLrD80lMAxUz7tL39C0SMpFIjwxcbIHwBkB8CHUS4Pj7hZnBG3pU7t/cv7zVmQbi286F TBPA== X-Gm-Message-State: AOJu0YxRjV8iGZkUqQdyYozTFAOhm9y6Pd1JZK6BI09QEzQ/GqGRXz/3 NYoRgsPGhbMXKay3dMhNpQs= X-Received: by 2002:a17:90a:d356:b0:268:14a0:f8a with SMTP id i22-20020a17090ad35600b0026814a00f8amr1481466pjx.39.1691658607856; Thu, 10 Aug 2023 02:10:07 -0700 (PDT) Received: from CLOUDLIANG-MB2.tencent.com ([103.7.29.32]) by smtp.gmail.com with ESMTPSA id pc16-20020a17090b3b9000b00263154aab24sm970704pjb.57.2023.08.10.02.10.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Aug 2023 02:10:07 -0700 (PDT) From: Jinrong Liang X-Google-Original-From: Jinrong Liang To: Sean Christopherson Cc: Paolo Bonzini , Isaku Yamahata , Jim Mattson , Shuah Khan , Aaron Lewis , David Matlack , Vishal Annapurve , Wanpeng Li , Like Xu , Jinrong Liang , linux-kselftest@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v6 2/6] KVM: selftests: Drop the return of remove_event() Date: Thu, 10 Aug 2023 17:09:41 +0800 Message-Id: <20230810090945.16053-3-cloudliang@tencent.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230810090945.16053-1-cloudliang@tencent.com> References: <20230810090945.16053-1-cloudliang@tencent.com> MIME-Version: 1.0 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_NONE,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 From: Jinrong Liang None of the callers consume remove_event(), and it incorrectly implies that the incoming filter isn't modified. Drop the return. Suggested-by: Sean Christopherson Signed-off-by: Jinrong Liang --- tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c b/tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c index 40507ed9fe8a..5ac05e64bec9 100644 --- a/tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c +++ b/tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c @@ -265,8 +265,7 @@ static struct kvm_pmu_event_filter *event_filter(uint32_t action) * Remove the first occurrence of 'event' (if any) from the filter's * event list. */ -static struct kvm_pmu_event_filter *remove_event(struct kvm_pmu_event_filter *f, - uint64_t event) +static void remove_event(struct kvm_pmu_event_filter *f, uint64_t event) { bool found = false; int i; @@ -279,7 +278,6 @@ static struct kvm_pmu_event_filter *remove_event(struct kvm_pmu_event_filter *f, } if (found) f->nevents--; - return f; } #define ASSERT_PMC_COUNTING_INSTRUCTIONS() \ -- 2.39.3