hw/virtio: Document *_should_notify() are called within rcu_read_lock()
PATCH 1/1 hw/virtio: Document *_should_notify() are called within rcu_read_lock()
Such comments make reviewing this file somehow easier.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
--- hw/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+)
hw/virtio/virtio.c +2 -0
@@ -2449,6 +2449,7 @@ static void virtio_set_isr(VirtIODevice *vdev, int value) } } +/* Called within rcu_read_lock(). */ static bool virtio_split_should_notify (VirtIODevice *vdev,VirtQueue *vq) {uint16_t old, new;
@@ -2485,6 +2486,7 @@ static bool vring_packed_need_event(VirtQueue *vq, bool wrap,return vring_need_event (off, new, old); } +/* Called within rcu_read_lock(). */ static bool virtio_packed_should_notify (VirtIODevice *vdev,VirtQueue *vq) {VRingPackedDescEvent e;
Signature · 1 line
2.26.3
Quoted 3 lines · Philippe Mathieu-Daudé
Such comments make reviewing this file somehow easier.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
ok but
Quoted 17 lines
--- hw/virtio/virtio.c | 2 ++ 1 file changed, 2 insertions(+)hw/virtio/virtio.c +1
-0@@ -2449,6 +2449,7 @@ static void virtio_set_isr(VirtIODevice *vdev, int value) } } +/* Called within rcu_read_lock(). */ static bool virtio_split_should_notify (VirtIODevice *vdev,VirtQueue *vq) {uint16_t old, new;
hw/virtio/virtio.c static bool vring_packed_need_event(VirtQueue *vq, bool wrap, · line 2492
Quoted 7 lines
hw/virtio/virtio.c +1
-0@@ -2485,6 +2486,7 @@ static bool vring_packed_need_event(VirtQueue *vq, bool wrap,return vring_need_event (off, new, old); } +/* Called within rcu_read_lock(). */ static bool virtio_packed_should_notify (VirtIODevice *vdev,VirtQueue *vq) {VRingPackedDescEvent e;
one space before */ please, not two.
Quoted 2 lines
Signature · 1 line
2.26.3