From: Yuanhan Liu Date: Tue, 2 Feb 2016 13:48:13 +0000 (+0800) Subject: virtio: define offset as size_t type X-Git-Tag: spdx-start~7663 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4c2277ff45436eac87a3b0ff89235b465a7a4c5b;p=dpdk.git virtio: define offset as size_t type offset arg of vtpci_read/write_dev_config is derived from offsetof(), which is of size_t type, instead of uint64_t. So, define it as size_t type. Signed-off-by: Yuanhan Liu Tested-by: Qian Xu Reviewed-by: Tetsuya Mukawa Tested-by: Tetsuya Mukawa Acked-by: Huawei Xie --- diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c index 2245becad9..b34b59e67e 100644 --- a/drivers/net/virtio/virtio_pci.c +++ b/drivers/net/virtio/virtio_pci.c @@ -38,7 +38,7 @@ static uint8_t vtpci_get_status(struct virtio_hw *); void -vtpci_read_dev_config(struct virtio_hw *hw, uint64_t offset, +vtpci_read_dev_config(struct virtio_hw *hw, size_t offset, void *dst, int length) { uint64_t off; @@ -61,7 +61,7 @@ vtpci_read_dev_config(struct virtio_hw *hw, uint64_t offset, } void -vtpci_write_dev_config(struct virtio_hw *hw, uint64_t offset, +vtpci_write_dev_config(struct virtio_hw *hw, size_t offset, void *src, int length) { uint64_t off; diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h index 47f722a026..fe89c21a24 100644 --- a/drivers/net/virtio/virtio_pci.h +++ b/drivers/net/virtio/virtio_pci.h @@ -261,9 +261,9 @@ void vtpci_set_status(struct virtio_hw *, uint8_t); uint32_t vtpci_negotiate_features(struct virtio_hw *, uint32_t); -void vtpci_write_dev_config(struct virtio_hw *, uint64_t, void *, int); +void vtpci_write_dev_config(struct virtio_hw *, size_t, void *, int); -void vtpci_read_dev_config(struct virtio_hw *, uint64_t, void *, int); +void vtpci_read_dev_config(struct virtio_hw *, size_t, void *, int); uint8_t vtpci_isr(struct virtio_hw *);