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>
This commit is contained in:

committed by
Michael Ellerman

parent
ed8e443fee
commit
8b4e6deaff
@@ -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,
|
||||
|
Reference in New Issue
Block a user