patches for DPDK stable branches
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: stephen@networkplumber.org, anatoly.burakov@intel.com,
	thomas@monjalon.net, ktraynor@redhat.com, stable@dpdk.org,
	Chas Williams <chas3@att.com>
Subject: [dpdk-stable] [PATCH v3 05/12] net/bonding: use non deprecated PCI API
Date: Fri, 25 Oct 2019 15:56:04 +0200	[thread overview]
Message-ID: <1572011772-23271-6-git-send-email-david.marchand@redhat.com> (raw)
In-Reply-To: <1572011772-23271-1-git-send-email-david.marchand@redhat.com>

rte_eal_compare_pci_addr has been deprecated since v17.11.
Convert to rte_pci_addr_cmp.

Fixes: c848b518bbc7 ("net/bonding: support bifurcated driver in eal")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/net/bonding/rte_eth_bond_args.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_args.c b/drivers/net/bonding/rte_eth_bond_args.c
index f298ea0..bfe03c3 100644
--- a/drivers/net/bonding/rte_eth_bond_args.c
+++ b/drivers/net/bonding/rte_eth_bond_args.c
@@ -60,11 +60,10 @@ find_port_id_by_dev_name(const char *name)
 static inline int
 bond_pci_addr_cmp(const struct rte_device *dev, const void *_pci_addr)
 {
-	struct rte_pci_device *pdev;
+	const struct rte_pci_device *pdev = RTE_DEV_TO_PCI_CONST(dev);
 	const struct rte_pci_addr *paddr = _pci_addr;
 
-	pdev = RTE_DEV_TO_PCI(*(struct rte_device **)(void *)&dev);
-	return rte_eal_compare_pci_addr(&pdev->addr, paddr);
+	return rte_pci_addr_cmp(&pdev->addr, paddr);
 }
 
 /**
-- 
1.8.3.1


      parent reply	other threads:[~2019-10-25 13:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1571736761-32134-1-git-send-email-david.marchand@redhat.com>
2019-10-22  9:32 ` [dpdk-stable] [PATCH 5/8] " David Marchand
     [not found] ` <1571856864-8779-1-git-send-email-david.marchand@redhat.com>
2019-10-23 18:54   ` [dpdk-stable] [PATCH v2 05/12] " David Marchand
     [not found] ` <1572011772-23271-1-git-send-email-david.marchand@redhat.com>
2019-10-25 13:56   ` David Marchand [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1572011772-23271-6-git-send-email-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=chas3@att.com \
    --cc=dev@dpdk.org \
    --cc=ktraynor@redhat.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).