powerpc/perf: Pass struct imc_events as a parameter to imc_parse_event()
authorAnju T Sudhakar <anju@linux.vnet.ibm.com>
Mon, 11 Dec 2017 05:58:37 +0000 (11:28 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 19 Jan 2018 12:04:44 +0000 (23:04 +1100)
commit8b4e6deaff7822c76c94336c40f8d1f244c6f6ed
treeecf21a363309204ca76d5a41fa16c6fdc8f4ce36
parented8e443feee2bde8539f865092289eeaf0681c3f
powerpc/perf: Pass struct imc_events as a parameter to imc_parse_event()

Remove the allocation of struct imc_events from imc_parse_event().
Instead pass imc_events as a parameter to imc_parse_event(), which is
a pointer to a slot in the array allocated in
update_events_in_group().

Reported-by: Dan Carpenter ("powerpc/perf: Fix a sizeof() typo so we allocate less memory")
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Anju T Sudhakar <anju@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/imc-pmu.h
arch/powerpc/perf/imc-pmu.c