lkml.org 
[lkml]   [2019]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH V2 4/9] genirq/timings: Use the min kernel macro
From
Date
On 24/05/2019 15:57, Andy Shevchenko wrote:
> On Fri, May 24, 2019 at 01:16:10PM +0200, Daniel Lezcano wrote:
>> The' min' is available as a kernel macro. Use it instead of writing
>> the same code.
>
> While it's technically correct...
>
>> /*
>> * 'count' will depends if the circular buffer wrapped or not
>> */
>> - count = irqs->count < IRQ_TIMINGS_SIZE ?
>> - irqs->count : IRQ_TIMINGS_SIZE;
>> + count = min_t(int, irqs->count, IRQ_TIMINGS_SIZE);
>>
>> start = irqs->count < IRQ_TIMINGS_SIZE ?
>> 0 : (irqs->count & IRQ_TIMINGS_MASK);
>
> ...looking to the context I would leave as is to have a pattern.

Yes, you are right. I'll drop this patch.


--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

\
 
 \ /
  Last update: 2019-05-24 18:12    [W:0.033 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site