lkml.org 
[lkml]   [2020]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] perf pmu: Improve CPU core PMU HW event list ordering
From
Date
On 15/06/2020 15:36, Namhyung Kim wrote:>>   static int cmp_sevent(const 
void *a, const void *b)
>> @@ -1416,6 +1417,12 @@ static int cmp_sevent(const void *a, const void *b)
>> if (n)
>> return n;
>> }
>> +
>> + if (as->is_cpu && !bs->is_cpu)
>> + return -1;
>> + else if (!as->is_cpu && bs->is_cpu)
>> + return 1;
>> +
> This can be:
>
> if (as->is_cpu != bs->is_cpu)
> return bs->is_cpu - as->is_cpu;
>

That's more concise, but maybe not as readable at a glance. I don't mind
though, so can change.

Thanks,
John

\
 
 \ /
  Last update: 2020-06-15 16:53    [W:0.043 / U:1.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site