From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH 2/2] block: Move shared code in get_chunk() out of if statement
Date: Mon, 21 Jan 2019 22:06:25 -0800 [thread overview]
Message-ID: <20190122060625.12337-2-andrew.smirnov@gmail.com> (raw)
In-Reply-To: <20190122060625.12337-1-andrew.smirnov@gmail.com>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
common/block.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/common/block.c b/common/block.c
index 3a031a4fc..291721876 100644
--- a/common/block.c
+++ b/common/block.c
@@ -133,13 +133,12 @@ static struct chunk *get_chunk(struct block_device *blk)
chunk->dirty = 0;
}
-
- list_del(&chunk->list);
} else {
chunk = list_first_entry(&blk->idle_blocks, struct chunk, list);
- list_del(&chunk->list);
}
+ list_del(&chunk->list);
+
return chunk;
}
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-01-22 6:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-22 6:06 [PATCH 1/2] block: Do not write past block device boundary during a flush Andrey Smirnov
2019-01-22 6:06 ` Andrey Smirnov [this message]
2019-01-22 7:57 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190122060625.12337-2-andrew.smirnov@gmail.com \
--to=andrew.smirnov@gmail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox