diff options
author | Anju T Sudhakar <anju@linux.vnet.ibm.com> | 2017-12-11 11:28:37 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-01-19 23:04:44 +1100 |
commit | 8b4e6deaff7822c76c94336c40f8d1f244c6f6ed (patch) | |
tree | ecf21a363309204ca76d5a41fa16c6fdc8f4ce36 /arch/powerpc/include/asm/imc-pmu.h | |
parent | ed8e443feee2bde8539f865092289eeaf0681c3f (diff) | |
download | lwn-8b4e6deaff7822c76c94336c40f8d1f244c6f6ed.tar.gz lwn-8b4e6deaff7822c76c94336c40f8d1f244c6f6ed.zip |
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>
Diffstat (limited to 'arch/powerpc/include/asm/imc-pmu.h')
-rw-r--r-- | arch/powerpc/include/asm/imc-pmu.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/imc-pmu.h b/arch/powerpc/include/asm/imc-pmu.h index fad0e6ff460f..080731dc883a 100644 --- a/arch/powerpc/include/asm/imc-pmu.h +++ b/arch/powerpc/include/asm/imc-pmu.h @@ -71,7 +71,7 @@ struct imc_events { struct imc_pmu { struct pmu pmu; struct imc_mem_info *mem_info; - struct imc_events **events; + struct imc_events *events; /* * Attribute groups for the PMU. Slot 0 used for * format attribute, slot 1 used for cpusmask attribute, |