[PATCH liburing v1 3/3] queue: Remove unnecessary goto and label

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

 



From: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx>

This 'goto done' and 'done:' label are not needed, there is no cleanup
needed in this path. Simplify it. Just return 0 directly.

Signed-off-by: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx>
---
 src/queue.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/queue.c b/src/queue.c
index 277cdcc..a670a8e 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -158,25 +158,24 @@ again:
 			cqes[i] = &ring->cq.cqes[(head & mask) << shift];
 
 		return count;
 	}
 
 	if (overflow_checked)
-		goto done;
+		return 0;
 
 	if (cq_ring_needs_flush(ring)) {
 		int flags = IORING_ENTER_GETEVENTS;
 
 		if (ring->int_flags & INT_FLAG_REG_RING)
 			flags |= IORING_ENTER_REGISTERED_RING;
 		__sys_io_uring_enter(ring->enter_ring_fd, 0, 0, flags, NULL);
 		overflow_checked = true;
 		goto again;
 	}
 
-done:
 	return 0;
 }
 
 /*
  * Sync internal state with kernel ring state on the SQ side. Returns the
  * number of pending items in the SQ ring, for the shared ring.
-- 
Ammar Faizi




[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