[PATCH for-4.17 2/6] test/vpci: fix vPCI test harness to provide pci_get_pdev()

Roger Pau Monne posted 6 patches 3 years, 3 months ago
There is a newer version of this series
[PATCH for-4.17 2/6] test/vpci: fix vPCI test harness to provide pci_get_pdev()
Posted by Roger Pau Monne 3 years, 3 months ago
Instead of pci_get_pdev_by_domain(), which is no longer present in the
hypervisor.

While there add parentheses around the define value.

Fixes: a37f9ea7a6 ('PCI: fold pci_get_pdev{,_by_domain}()')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 tools/tests/vpci/emul.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/tests/vpci/emul.h b/tools/tests/vpci/emul.h
index 386b15eb86..f03e3a56d1 100644
--- a/tools/tests/vpci/emul.h
+++ b/tools/tests/vpci/emul.h
@@ -92,7 +92,7 @@ typedef union {
 #define xmalloc(type) ((type *)malloc(sizeof(type)))
 #define xfree(p) free(p)
 
-#define pci_get_pdev_by_domain(...) &test_pdev
+#define pci_get_pdev(...) (&test_pdev)
 #define pci_get_ro_map(...) NULL
 
 #define test_bit(...) false
-- 
2.37.3


Re: [PATCH for-4.17 2/6] test/vpci: fix vPCI test harness to provide pci_get_pdev()
Posted by Anthony PERARD 3 years, 3 months ago
On Thu, Oct 20, 2022 at 11:46:45AM +0200, Roger Pau Monne wrote:
> Instead of pci_get_pdev_by_domain(), which is no longer present in the
> hypervisor.
> 
> While there add parentheses around the define value.
> 
> Fixes: a37f9ea7a6 ('PCI: fold pci_get_pdev{,_by_domain}()')
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks,

-- 
Anthony PERARD