* [Qemu-devel] [PATCH] qcow2: remove unnecessary check
@ 2015-07-02 8:06 Alberto Garcia
2015-07-02 14:17 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Alberto Garcia @ 2015-07-02 8:06 UTC (permalink / raw)
To: qemu-devel; +Cc: Alberto Garcia, Stefan Hajnoczi, qemu-block
The value of 'i' is guaranteed to be >= 0
Signed-off-by: Alberto Garcia <berto@igalia.com>
---
block/qcow2-cache.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c
index ed92a09..53b8afc 100644
--- a/block/qcow2-cache.c
+++ b/block/qcow2-cache.c
@@ -281,9 +281,6 @@ static int qcow2_cache_do_get(BlockDriverState *bs, Qcow2Cache *c,
i = min_lru_index;
trace_qcow2_cache_get_replace_entry(qemu_coroutine_self(),
c == s->l2_table_cache, i);
- if (i < 0) {
- return i;
- }
ret = qcow2_cache_entry_flush(bs, c, i);
if (ret < 0) {
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] qcow2: remove unnecessary check
2015-07-02 8:06 [Qemu-devel] [PATCH] qcow2: remove unnecessary check Alberto Garcia
@ 2015-07-02 14:17 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2015-07-02 14:17 UTC (permalink / raw)
To: Alberto Garcia; +Cc: qemu-devel, qemu-block
[-- Attachment #1: Type: text/plain, Size: 335 bytes --]
On Thu, Jul 02, 2015 at 11:06:11AM +0300, Alberto Garcia wrote:
> The value of 'i' is guaranteed to be >= 0
>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
> block/qcow2-cache.c | 3 ---
> 1 file changed, 3 deletions(-)
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-02 14:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-02 8:06 [Qemu-devel] [PATCH] qcow2: remove unnecessary check Alberto Garcia
2015-07-02 14:17 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).