From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 34678C374 for ; Thu, 28 Jan 2016 08:54:26 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 27 Jan 2016 23:54:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,357,1449561600"; d="scan'208";a="37565580" Received: from yliu-dev.sh.intel.com ([10.239.66.49]) by fmsmga004.fm.intel.com with ESMTP; 27 Jan 2016 23:54:23 -0800 From: Yuanhan Liu To: dev@dpdk.org Date: Thu, 28 Jan 2016 15:54:50 +0800 Message-Id: <1453967697-3757-3-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1453967697-3757-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1453191125-26335-1-git-send-email-yuanhan.liu@linux.intel.com> <1453967697-3757-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-dev] [PATCH v6 2/9] virtio: define offset as size_t type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2016 07:54:26 -0000 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 --- drivers/net/virtio/virtio_pci.c | 4 ++-- drivers/net/virtio/virtio_pci.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c index 2245bec..b34b59e 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 47f722a..fe89c21 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 *); -- 1.9.0