[PATCH] x86:intel:remove unneeded variable

From: cgel . zte
Date: Wed Dec 08 2021 - 20:56:19 EST


From: chiminghao <chi.minghao@xxxxxxxxxx>

return value form directly instead of
taking this in another redundant variable.

Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
Signed-off-by: chiminghao <chi.minghao@xxxxxxxxxx>
---
arch/x86/events/intel/core.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index 603964408d2d..6ba7e0ef8db4 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -4106,23 +4106,17 @@ static struct event_constraint *
glp_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
struct perf_event *event)
{
- struct event_constraint *c;
-
/* :ppp means to do reduced skid PEBS which is PMC0 only. */
if (event->attr.precise_ip == 3)
return &counter0_constraint;

- c = intel_get_event_constraints(cpuc, idx, event);
-
- return c;
+ return intel_get_event_constraints(cpuc, idx, event);
}

static struct event_constraint *
tnt_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
struct perf_event *event)
{
- struct event_constraint *c;
-
/*
* :ppp means to do reduced skid PEBS,
* which is available on PMC0 and fixed counter 0.
@@ -4135,9 +4129,7 @@ tnt_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
return &counter0_constraint;
}

- c = intel_get_event_constraints(cpuc, idx, event);
-
- return c;
+ return intel_get_event_constraints(cpuc, idx, event);
}

static bool allow_tsx_force_abort = true;
--
2.25.1