Thread (65 messages) 65 messages, 14 authors, 2022-08-17

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

From: "Guilherme G. Piccoli" <gpiccoli@igalia.com>
Date: 2022-07-25 22:06:26
Also in: kexec, linux-hyperv, lkml

On 25/07/2022 15:09, Michael Kelley (LINUX) wrote:
[...]
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help