From: Pablo de Lara Date: Sat, 9 Jul 2016 01:06:11 +0000 (+0100) Subject: drivers: remove static driver names X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=bae696ebd4e28b31ebe57367f5e11270232ecd26;p=dpdk.git drivers: remove static driver names Since now the PMD_REGISTER_DRIVER macro sets the driver names, there is no need to have the rte_driver structure setting it statically, as it will get overridden. Signed-off-by: Pablo de Lara Acked-by: Neil Horman --- diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index 1d48e971c3..238eed8127 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -890,7 +890,6 @@ rte_pmd_af_packet_devuninit(const char *name) } static struct rte_driver pmd_af_packet_drv = { - .name = "eth_af_packet", .type = PMD_VDEV, .init = rte_pmd_af_packet_devinit, .uninit = rte_pmd_af_packet_devuninit, diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 9531abf8f8..9a2123ecb6 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1041,7 +1041,6 @@ static int bnxt_rte_pmd_init(const char *name, const char *params __rte_unused) } static struct rte_driver bnxt_pmd_drv = { - .name = "eth_bnxt", .type = PMD_PDEV, .init = bnxt_rte_pmd_init, }; diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index c3737467f7..0361be3eec 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2509,7 +2509,6 @@ bond_ethdev_configure(struct rte_eth_dev *dev) } static struct rte_driver bond_drv = { - .name = "eth_bond", .type = PMD_VDEV, .init = bond_init, .uninit = bond_uninit, diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index 7e0e819e28..0c12bec45e 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -1056,7 +1056,6 @@ static int rte_cxgbe_pmd_init(const char *name __rte_unused, } static struct rte_driver rte_cxgbe_driver = { - .name = "cxgbe_driver", .type = PMD_PDEV, .init = rte_cxgbe_pmd_init, }; diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 702289b803..11c7218e73 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1445,7 +1445,6 @@ rte_ena_pmd_init(const char *name __rte_unused, }; struct rte_driver ena_pmd_drv = { - .name = "ena_driver", .type = PMD_PDEV, .init = rte_ena_pmd_init, }; diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index d9ffb13dd4..8e1f7cb216 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -5857,7 +5857,6 @@ rte_mlx4_pmd_init(const char *name, const char *args) static struct rte_driver rte_mlx4_driver = { .type = PMD_PDEV, - .name = MLX4_DRIVER_NAME, .init = rte_mlx4_pmd_init, }; diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 8d32252b1f..d96a9affaa 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -758,7 +758,6 @@ rte_mlx5_pmd_init(const char *name, const char *args) static struct rte_driver rte_mlx5_driver = { .type = PMD_PDEV, - .name = MLX5_DRIVER_NAME, .init = rte_mlx5_pmd_init, }; diff --git a/drivers/net/mpipe/mpipe_tilegx.c b/drivers/net/mpipe/mpipe_tilegx.c index 64f4251fdc..93f87308fb 100644 --- a/drivers/net/mpipe/mpipe_tilegx.c +++ b/drivers/net/mpipe/mpipe_tilegx.c @@ -1624,13 +1624,11 @@ rte_pmd_mpipe_devinit(const char *ifname, } static struct rte_driver pmd_mpipe_xgbe_drv = { - .name = "xgbe", .type = PMD_VDEV, .init = rte_pmd_mpipe_devinit, }; static struct rte_driver pmd_mpipe_gbe_drv = { - .name = "gbe", .type = PMD_VDEV, .init = rte_pmd_mpipe_devinit, }; diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index ae0ff777e6..367b884b2b 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -687,7 +687,6 @@ rte_pmd_null_devuninit(const char *name) } static struct rte_driver pmd_null_drv = { - .name = "eth_null", .type = PMD_VDEV, .init = rte_pmd_null_devinit, .uninit = rte_pmd_null_devuninit, diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 7125823517..1bcd7e507b 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -1084,7 +1084,6 @@ rte_pmd_pcap_devuninit(const char *name) } static struct rte_driver pmd_pcap_drv = { - .name = "eth_pcap", .type = PMD_VDEV, .init = rte_pmd_pcap_devinit, .uninit = rte_pmd_pcap_devuninit, diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index f2f5217144..dee5038586 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -624,7 +624,6 @@ rte_pmd_ring_devuninit(const char *name) } static struct rte_driver pmd_ring_drv = { - .name = "eth_ring", .type = PMD_VDEV, .init = rte_pmd_ring_devinit, .uninit = rte_pmd_ring_devuninit, diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c index e71bce51bc..483d7894cc 100644 --- a/drivers/net/szedata2/rte_eth_szedata2.c +++ b/drivers/net/szedata2/rte_eth_szedata2.c @@ -62,7 +62,7 @@ */ #define RTE_SZE2_PACKET_HEADER_SIZE_ALIGNED 8 -#define RTE_SZEDATA2_DRIVER_NAME "rte_szedata2_pmd" +#define RTE_SZEDATA2_DRIVER_NAME rte_szedata2_pmd #define RTE_SZEDATA2_PCI_DRIVER_NAME "rte_szedata2_pmd" #define SZEDATA2_DEV_PATH_FMT "/dev/szedataII%u" @@ -1596,10 +1596,9 @@ rte_szedata2_uninit(const char *name __rte_unused) static struct rte_driver rte_szedata2_driver = { .type = PMD_PDEV, - .name = RTE_SZEDATA2_DRIVER_NAME, .init = rte_szedata2_init, .uninit = rte_szedata2_uninit, }; -PMD_REGISTER_DRIVER(rte_szedata2_driver, rte_szedata2_pmd); -DRIVER_REGISTER_PCI_TABLE(rte_szedata2_pmd, rte_szedata2_pci_id_table); +PMD_REGISTER_DRIVER(rte_szedata2_driver, RTE_SZEDATA2_DRIVER_NAME); +DRIVER_REGISTER_PCI_TABLE(RTE_SZEDATA2_DRIVER_NAME, rte_szedata2_pci_id_table); diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 03bf458ad9..6e58d824f6 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -1783,7 +1783,6 @@ rte_nicvf_pmd_init(const char *name __rte_unused, const char *para __rte_unused) } static struct rte_driver rte_nicvf_driver = { - .name = "nicvf_driver", .type = PMD_PDEV, .init = rte_nicvf_pmd_init, }; diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index a02dd552d8..e42ee2cbc8 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -915,7 +915,6 @@ rte_pmd_vhost_devuninit(const char *name) } static struct rte_driver pmd_vhost_drv = { - .name = "eth_vhost", .type = PMD_VDEV, .init = rte_pmd_vhost_devinit, .uninit = rte_pmd_vhost_devuninit, diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 2ed43803d5..8eb166e47b 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -431,7 +431,6 @@ virtio_user_pmd_devuninit(const char *name) } static struct rte_driver virtio_user_driver = { - .name = "virtio-user", .type = PMD_VDEV, .init = virtio_user_pmd_devinit, .uninit = virtio_user_pmd_devuninit, diff --git a/drivers/net/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c index 51225590d0..b940e94afe 100644 --- a/drivers/net/xenvirt/rte_eth_xenvirt.c +++ b/drivers/net/xenvirt/rte_eth_xenvirt.c @@ -760,7 +760,6 @@ rte_pmd_xenvirt_devuninit(const char *name) } static struct rte_driver pmd_xenvirt_drv = { - .name = "eth_xenvirt", .type = PMD_VDEV, .init = rte_pmd_xenvirt_devinit, .uninit = rte_pmd_xenvirt_devuninit,