All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86:intel:remove unneeded variable
@ 2021-12-09  1:56 cgel.zte
  0 siblings, 0 replies; only message in thread
From: cgel.zte @ 2021-12-09  1:56 UTC (permalink / raw)
  To: peterz
  Cc: mingo, acme, mark.rutland, alexander.shishkin, jolsa, namhyung,
	tglx, bp, dave.hansen, x86, hpa, linux-perf-users, linux-kernel,
	chiminghao, Zeal Robot

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-09  1:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09  1:56 [PATCH] x86:intel:remove unneeded variable cgel.zte

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.