lkml.org 
[lkml]   [2022]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v7 5/7] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver
From
On 12/04/2022 08:41, Yicong Yang wrote:
>>> +    hisi_ptt_pmus = zalloc(sizeof(struct perf_pmu *) * (*nr_ptts));
>>> +    if (!hisi_ptt_pmus) {
>>> +        pr_err("hisi_ptt alloc failed\n");
>>> +        *err = -ENOMEM;
>> using PTR_ERR seems better, if possible
>>
> ok will change to that. *err = -ENOMEM is used here to keep consistence with
> what spe does.
>

Ah, I see that we are contrained by the interface of
auxtrace_record_init() to pass err as a pointer, so I suppose the code
in this patch is ok to fit into that.

\
 
 \ /
  Last update: 2022-04-14 15:01    [W:0.074 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site