[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] vpc: Remove useless parameters in get_sector_offset
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH] vpc: Remove useless parameters in get_sector_offset() |
Date: |
Thu, 13 Jul 2017 14:37:43 +0200 |
All callers of get_sector_offset() pass write=false and err=NULL. Remove
the parameters.
Signed-off-by: Kevin Wolf <address@hidden>
---
Based on my block branch, specifically Peter's 'block/vpc.c: Handle write
failures in get_image_offset()'
block/vpc.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/block/vpc.c b/block/vpc.c
index bccc981..471f9ab 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -508,10 +508,9 @@ static inline int64_t get_image_offset(BlockDriverState
*bs, uint64_t offset,
}
static inline int64_t get_sector_offset(BlockDriverState *bs,
- int64_t sector_num, bool write,
- int *err)
+ int64_t sector_num)
{
- return get_image_offset(bs, sector_num * BDRV_SECTOR_SIZE, write, err);
+ return get_image_offset(bs, sector_num * BDRV_SECTOR_SIZE, false, NULL);
}
/*
@@ -721,7 +720,7 @@ static int64_t coroutine_fn
vpc_co_get_block_status(BlockDriverState *bs,
(sector_num << BDRV_SECTOR_BITS);
}
- offset = get_sector_offset(bs, sector_num, false, NULL);
+ offset = get_sector_offset(bs, sector_num);
start = offset;
allocated = (offset != -1);
*pnum = 0;
@@ -744,7 +743,7 @@ static int64_t coroutine_fn
vpc_co_get_block_status(BlockDriverState *bs,
if (nb_sectors == 0) {
break;
}
- offset = get_sector_offset(bs, sector_num, false, NULL);
+ offset = get_sector_offset(bs, sector_num);
} while (offset == -1);
return 0;
--
1.8.3.1
- [Qemu-devel] [PATCH] vpc: Remove useless parameters in get_sector_offset(),
Kevin Wolf <=