Re: [PATCH v2 11/13] video/hyperv_fb: Avoid taking busy spinlock on panic path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux