[SLOF] [PATCH v5 01/23] virtio-blk: fix gcc warnings (-Wextra)
Thomas Huth
thuth at redhat.com
Fri Jan 29 23:30:02 AEDT 2016
On 29.01.2016 12:19, Nikunj A Dadhania wrote:
> Change the prototype of virtioblk_read as blocknum wont be negative
>
> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
> ---
> lib/libvirtio/virtio-blk.c | 2 +-
> lib/libvirtio/virtio-blk.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/libvirtio/virtio-blk.c b/lib/libvirtio/virtio-blk.c
> index 826f2ea..6eb4a64 100644
> --- a/lib/libvirtio/virtio-blk.c
> +++ b/lib/libvirtio/virtio-blk.c
> @@ -87,7 +87,7 @@ virtioblk_shutdown(struct virtio_device *dev)
> * @return number of blocks that have been read successfully
> */
> int
> -virtioblk_read(struct virtio_device *dev, char *buf, long blocknum, long cnt)
> +virtioblk_read(struct virtio_device *dev, char *buf, uint64_t blocknum, long cnt)
> {
> struct vring_desc *desc;
> int id;
> diff --git a/lib/libvirtio/virtio-blk.h b/lib/libvirtio/virtio-blk.h
> index ac8bf28..2e7b592 100644
> --- a/lib/libvirtio/virtio-blk.h
> +++ b/lib/libvirtio/virtio-blk.h
> @@ -55,6 +55,6 @@ struct virtio_blk_req {
>
> extern int virtioblk_init(struct virtio_device *dev);
> extern void virtioblk_shutdown(struct virtio_device *dev);
> -extern int virtioblk_read(struct virtio_device *dev, char *buf, long blocknum, long cnt);
> +extern int virtioblk_read(struct virtio_device *dev, char *buf, uint64_t blocknum, long cnt);
>
> #endif /* _VIRTIO_BLK_H */
Reviewed-by: Thomas Huth <thuth at redhat.com>
More information about the SLOF
mailing list