public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib: Make igt_device_get_pci_addr non-static.
@ 2019-03-21  9:53 Katarzyna Dec
  2019-03-21 10:04 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Katarzyna Dec @ 2019-03-21  9:53 UTC (permalink / raw)
  To: igt-dev

Let's make igt_pci_addr struct and igt_device_get_pci_addr
non-static to be able to use them in tests.

Signed-off-by: Katarzyna Dec <katarzyna.dec@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_device.c | 9 +--------
 lib/igt_device.h | 8 ++++++++
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/lib/igt_device.c b/lib/igt_device.c
index a2f9bb3a..fec84609 100644
--- a/lib/igt_device.c
+++ b/lib/igt_device.c
@@ -130,14 +130,7 @@ static bool igt_device_is_pci(int fd)
 	return strcmp(subsystem, "/pci") == 0;
 }
 
-struct igt_pci_addr {
-	unsigned int domain;
-	unsigned int bus;
-	unsigned int device;
-	unsigned int function;
-};
-
-static int igt_device_get_pci_addr(int fd, struct igt_pci_addr *pci)
+int igt_device_get_pci_addr(int fd, struct igt_pci_addr *pci)
 {
 	char path[IGT_DEV_PATH_LEN];
 	char *buf;
diff --git a/lib/igt_device.h b/lib/igt_device.h
index 278ba7a9..35eb4948 100644
--- a/lib/igt_device.h
+++ b/lib/igt_device.h
@@ -25,6 +25,13 @@
 #ifndef __IGT_DEVICE_H__
 #define __IGT_DEVICE_H__
 
+struct igt_pci_addr {
+	unsigned int domain;
+	unsigned int bus;
+	unsigned int device;
+	unsigned int function;
+};
+
 int __igt_device_set_master(int fd);
 void igt_device_set_master(int fd);
 
@@ -32,6 +39,7 @@ int __igt_device_drop_master(int fd);
 void igt_device_drop_master(int fd);
 
 int igt_device_get_card_index(int fd);
+int igt_device_get_pci_addr(int fd, struct igt_pci_addr *pci);
 struct pci_device *igt_device_get_pci_device(int fd);
 
 #endif /* __IGT_DEVICE_H__ */
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-21 21:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-21  9:53 [igt-dev] [PATCH i-g-t] lib: Make igt_device_get_pci_addr non-static Katarzyna Dec
2019-03-21 10:04 ` Chris Wilson
2019-03-21 11:15 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-03-21 21:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox