Messages in this thread Patch in this message | | | From | cgel.zte@gmail ... | Subject | [PATCH] x86:intel:remove unneeded variable | Date | Thu, 9 Dec 2021 01:56:10 +0000 |
| |
From: chiminghao <chi.minghao@zte.com.cn>
return value form directly instead of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cm> Signed-off-by: chiminghao <chi.minghao@zte.com.cn> --- 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
| |