diff mbox series

[19/20] block, bfq: remove unnecessary local variable __bfqq in bfq_setup_merge

Message ID 20221101093417.10540-20-shikemeng@huawei.com (mailing list archive)
State New, archived
Headers show
Series A few bugfix and cleanup patches for bfq-iosched | expand

Commit Message

Kemeng Shi Nov. 1, 2022, 9:34 a.m. UTC
We could traversal bfqq->new_bfqq list without a local variable easily and
intuitively. So remove unnecessary local variable __bfqq.

Signed-off-by: Kemeng Shi <shikemeng@huawei.com>
---
 block/bfq-iosched.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index d3f4d995f84a..589ab59abcf5 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -2741,7 +2741,6 @@  static struct bfq_queue *
 bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq)
 {
 	int process_refs, new_process_refs;
-	struct bfq_queue *__bfqq;
 
 	/*
 	 * If there are no process references on the new_bfqq, then it is
@@ -2753,10 +2752,9 @@  bfq_setup_merge(struct bfq_queue *bfqq, struct bfq_queue *new_bfqq)
 		return NULL;
 
 	/* Avoid a circular list and skip interim queue merges. */
-	while ((__bfqq = new_bfqq->new_bfqq)) {
-		if (__bfqq == bfqq)
+	while ((new_bfqq = new_bfqq->new_bfqq)) {
+		if (new_bfqq == bfqq)
 			return NULL;
-		new_bfqq = __bfqq;
 	}
 
 	process_refs = bfqq_process_refs(bfqq);