[dpdk-dev,v3,6/6] net/virtio: remove dead structure field

Message ID 1483697780-12088-7-git-send-email-yuanhan.liu@linux.intel.com
State Accepted, archived
Delegated to: Yuanhan Liu
Headers show

Checks

Context Check Description
ci/Intel compilation fail Compilation issues
ci/checkpatch success coding style OK

Commit Message

Yuanhan Liu Jan. 6, 2017, 10:16 a.m.
Actually, virtio_hw->dev is not used since the beginning when it's
introduced. Remove it.

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
---
 drivers/net/virtio/virtio_pci.c | 2 --
 drivers/net/virtio/virtio_pci.h | 1 -
 2 files changed, 3 deletions(-)

Comments

Yuanhan Liu Jan. 12, 2017, 6:02 a.m. | #1
On Fri, Jan 06, 2017 at 06:16:20PM +0800, Yuanhan Liu wrote:
> Actually, virtio_hw->dev is not used since the beginning when it's
> introduced. Remove it.

It's not true after the refactoring of decoupling from PCI device.
This patch is dropped. Instead, two more patches will be sent soon.

	--yliu

Patch

diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index f5754e5..fbdb5b7 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -730,8 +730,6 @@ 
 vtpci_init(struct rte_pci_device *dev, struct virtio_hw *hw,
 	   uint32_t *dev_flags)
 {
-	hw->dev = dev;
-
 	/*
 	 * Try if we can succeed reading virtio pci caps, which exists
 	 * only on modern pci device. If failed, we fallback to legacy
diff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h
index 511a1c8..4235bef 100644
--- a/drivers/net/virtio/virtio_pci.h
+++ b/drivers/net/virtio/virtio_pci.h
@@ -258,7 +258,6 @@  struct virtio_hw {
 	uint32_t    notify_off_multiplier;
 	uint8_t     *isr;
 	uint16_t    *notify_base;
-	struct rte_pci_device *dev;
 	struct virtio_pci_common_cfg *common_cfg;
 	struct virtio_net_config *dev_cfg;
 	void	    *virtio_user_dev;