]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86/intel: Simplify the dynamic constraint code somewhat
authorPeter Zijlstra <peterz@infradead.org>
Thu, 21 May 2015 08:57:24 +0000 (10:57 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 27 May 2015 07:17:43 +0000 (09:17 +0200)
commitb4434c45c8a1ab8a0021b143a9277bb76e1598ae
tree463268ffdddee2efed13e32d822ab90450353f73
parent86f0116097ffa15105393156d68ef3e520e9521a
perf/x86/intel: Simplify the dynamic constraint code somewhat

We have two 'struct event_constraint' local variables in
intel_get_excl_constraints(): 'cx' and 'c'.

Instead of using 'cx' after the dynamic allocation, put all 'cx' inside
the dynamic allocation block and use 'c' outside of it.

Also use direct assignment to copy the structure; let the compiler
figure it out.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/kernel/cpu/perf_event_intel.c