lkml.org 
[lkml]   [2022]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 11/13] video/hyperv_fb: Avoid taking busy spinlock on panic path
From
On 25/07/2022 15:09, Michael Kelley (LINUX) wrote:
> [...]
>> +bool hv_ringbuffer_spinlock_busy(struct vmbus_channel *channel)
>> +{
>> + struct hv_ring_buffer_info *rinfo = &channel->outbound;
>> +
>> + if (spin_is_locked(&rinfo->ring_lock))
>> + return true;
>> +
>> + return false;
>
> Could simplify the code as just:
>
> return spin_is_locked(&rinfo->ring_lock);
>

Sure, makes sense! Thanks for the suggestion, I'll do that for V3.
Cheers,


Guilherme

\
 
 \ /
  Last update: 2022-07-26 00:06    [W:0.907 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site