public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Katarzyna Dec <katarzyna.dec@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] lib: Make igt_device_get_pci_addr non-static.
Date: Thu, 21 Mar 2019 10:53:39 +0100	[thread overview]
Message-ID: <20190321095339.31273-1-katarzyna.dec@intel.com> (raw)

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

             reply	other threads:[~2019-03-21  9:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-21  9:53 Katarzyna Dec [this message]
2019-03-21 10:04 ` [igt-dev] [PATCH i-g-t] lib: Make igt_device_get_pci_addr non-static 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

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=20190321095339.31273-1-katarzyna.dec@intel.com \
    --to=katarzyna.dec@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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