perf/core fixes:
. The new perf_evsel__tp_sched_test 'perf test' broke the build by setting the 'ret' variable but not using it, caught by newer gcc -Werror=unused-but-set-variable, fix from Namhyung Kim. . pevent_parse_event should return a proper PEVENT_ERRNO__ and call pevent_free_format on its failure path, fixes from Namhyung Kim. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iQIcBAABAgAGBQJQYa9kAAoJENZQFvNTUqpAcqcP/RsWR9t2DRzX5H2ICkVOxwzA rf3LxYZPzd/4b8hNbqcLoS12ttg6a2vrUE02lGwuTtx2aX4a3SgnlmbkehAUJNjA iDy6+lfp6nZWJF23krFkl/sAte976IBCoiTscyX/8doiSMelwhz5toxwtalLNIl4 cO4k+3pMSEWjiE30CAqcxR7OF3B6SJM8gAe9B6ZhCwLTaYEBlH4mdUDI3gztx6bc G0lOPegDDC1dGAv8msBC3WwWxSgQaOGHetkC1cvD77CUL1YM1KzkxC5TEN8gT8qu 5Pz5rXQxQvyVzmFzhkOiC52PmDfpjNRgmIIvpGSaNfngHEWfFBFTnOcLpW7E9JyW ipmHRp1jw2hjPKgGR29pXMlZetTg0+QLUAlD1Thg9xiasnKDPmM5zFEcidloIFWk K5WNO2Y6ezQ4vd75LolIXA85mS8TPfU4FwKcLmQwmIk4fxIF4BrRXP+z69K3esIu yxS1rhj3qQY4LBOqqy3gE7KfthaKz1xsNpesAW6n2KDsqEO9I6lb0yVGMAhrDZMv o17u2lIlB3amVDZPO1vBWtU6OSlVb1i1dD1laUFt+nGVo7EeETMrckG8rxhVtTLj HAIipZzMsxcSWagiLlocVg4qGmnZ4aNQIvGjvHLlVDrBgZBC8QzZyWh9EfzKxbUe qkWZSi3dov59gwoWqNnV =EqiG -----END PGP SIGNATURE----- Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core fixes from Arnaldo Carvalho de Melo: * The new perf_evsel__tp_sched_test 'perf test' broke the build by setting the 'ret' variable but not using it, caught by newer gcc -Werror=unused-but-set-variable, fix from Namhyung Kim. * pevent_parse_event should return a proper PEVENT_ERRNO__ and call pevent_free_format on its failure path, fixes from Namhyung Kim. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Коммит
a91f408e44
|
@ -5044,8 +5044,10 @@ enum pevent_errno pevent_parse_event(struct pevent *pevent, const char *buf,
|
|||
/* Add pevent to event so that it can be referenced */
|
||||
event->pevent = pevent;
|
||||
|
||||
if (add_event(pevent, event))
|
||||
if (add_event(pevent, event)) {
|
||||
ret = PEVENT_ERRNO__MEM_ALLOC_FAILED;
|
||||
goto event_add_failed;
|
||||
}
|
||||
|
||||
#define PRINT_ARGS 0
|
||||
if (PRINT_ARGS && event->print_fmt.args)
|
||||
|
@ -5054,9 +5056,7 @@ enum pevent_errno pevent_parse_event(struct pevent *pevent, const char *buf,
|
|||
return 0;
|
||||
|
||||
event_add_failed:
|
||||
free(event->system);
|
||||
free(event->name);
|
||||
free(event);
|
||||
pevent_free_format(event);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -1233,7 +1233,7 @@ static int perf_evsel__test_field(struct perf_evsel *evsel, const char *name,
|
|||
ret = -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int perf_evsel__tp_sched_test(void)
|
||||
|
@ -1286,7 +1286,7 @@ static int perf_evsel__tp_sched_test(void)
|
|||
if (perf_evsel__test_field(evsel, "target_cpu", 4, true))
|
||||
ret = -1;
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct test {
|
||||
|
|
Загрузка…
Ссылка в новой задаче