Skip to content

Commit c853be2

Browse files
Jinrong Liangsean-jc
authored andcommitted
KVM: selftests: Drop the return of remove_event()
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 <[email protected]> Signed-off-by: Jinrong Liang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sean Christopherson <[email protected]>
1 parent cf6d80c commit c853be2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,7 @@ static struct kvm_pmu_event_filter *event_filter(uint32_t action)
265265
* Remove the first occurrence of 'event' (if any) from the filter's
266266
* event list.
267267
*/
268-
static struct kvm_pmu_event_filter *remove_event(struct kvm_pmu_event_filter *f,
269-
uint64_t event)
268+
static void remove_event(struct kvm_pmu_event_filter *f, uint64_t event)
270269
{
271270
bool found = false;
272271
int i;
@@ -279,7 +278,6 @@ static struct kvm_pmu_event_filter *remove_event(struct kvm_pmu_event_filter *f,
279278
}
280279
if (found)
281280
f->nevents--;
282-
return f;
283281
}
284282

285283
#define ASSERT_PMC_COUNTING_INSTRUCTIONS() \

0 commit comments

Comments
 (0)