[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bc1491be-6e08-465b-94be-6136bdac4d14@arm.com>
Date: Fri, 11 Oct 2024 10:51:22 +0100
From: Leo Yan <leo.yan@....com>
To: Adrian Hunter <adrian.hunter@...el.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
"Liang, Kan" <kan.liang@...ux.intel.com>,
James Clark <james.clark@...aro.org>, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/5] libperf cpumap: Correct reference count for
perf_cpu_map__merge()
On 10/11/24 10:46, Adrian Hunter wrote:
[...]
>>>> int perf_cpu_map__merge_in(struct perf_cpu_map **orig, struct perf_cpu_map *other)
>>>> {
>>>> struct perf_cpu_map *result = perf_cpu_map__merge(*orig, other);
>>>>
>>>> if (!result)
>>>> return -ENOMEM;
>>>>
>>>> *orig = result;
>>>> return 0;
>>>> }
>>>>
>>>> without any changes to perf_cpu_map__merge().
>>>
>>> Just wandering why we cannot do the same thing for the perf_cpu_map__merge()
>>> function?
>>>
>>> int perf_cpu_map__merge_in(struct perf_cpu_map **orig,
>>> struct perf_cpu_map *other)
>>
>> Sorry for typo and spamming. The above suggested definition is for perf_cpu_map__merge().
>
> Yes - there is not much reason to have perf_cpu_map__merge()
> and perf_cpu_map__merge_in().
Thanks for suggestion! Will move towards this.
Leo
Powered by blists - more mailing lists