summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2019-07-12 17:08:40 -0500
committerBjorn Helgaas <bhelgaas@google.com>2019-07-12 17:08:40 -0500
commit31d5a608b13b7251286699860630d36b0eb1def4 (patch)
treeec3a528ba96b0f2663f5c34d8274a61d12b71d79
parent950cfbf0a52bd5720a7aa95eae70d73d2ec5d489 (diff)
parentaf3366308ea4c5473dfa5d2ace66b45cd3b1aec0 (diff)
downloadlwn-31d5a608b13b7251286699860630d36b0eb1def4.tar.gz
lwn-31d5a608b13b7251286699860630d36b0eb1def4.zip
Merge branch 'remotes/lorenzo/pci/misc'
- Fix pcitest build issues (Alan Mikhak) - Fix pcitest installation issue (Andy Shevchenko) * remotes/lorenzo/pci/misc: tools: PCI: Fix installation when `make tools/pci_install` tools: PCI: Fix compiler warning in pcitest tools: PCI: Fix broken pcitest compilation
-rw-r--r--tools/pci/Makefile5
-rw-r--r--tools/pci/pcitest.c8
2 files changed, 6 insertions, 7 deletions
diff --git a/tools/pci/Makefile b/tools/pci/Makefile
index 6876ee4bd78c..4b95a5176355 100644
--- a/tools/pci/Makefile
+++ b/tools/pci/Makefile
@@ -18,7 +18,6 @@ ALL_TARGETS := pcitest
ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
SCRIPTS := pcitest.sh
-ALL_SCRIPTS := $(patsubst %,$(OUTPUT)%,$(SCRIPTS))
all: $(ALL_PROGRAMS)
@@ -47,10 +46,10 @@ clean:
install: $(ALL_PROGRAMS)
install -d -m 755 $(DESTDIR)$(bindir); \
- for program in $(ALL_PROGRAMS) pcitest.sh; do \
+ for program in $(ALL_PROGRAMS); do \
install $$program $(DESTDIR)$(bindir); \
done; \
- for script in $(ALL_SCRIPTS); do \
+ for script in $(SCRIPTS); do \
install $$script $(DESTDIR)$(bindir); \
done
diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c
index 5fa5c2bdd427..6f1303104d84 100644
--- a/tools/pci/pcitest.c
+++ b/tools/pci/pcitest.c
@@ -47,15 +47,15 @@ struct pci_test {
unsigned long size;
};
-static void run_test(struct pci_test *test)
+static int run_test(struct pci_test *test)
{
- long ret;
+ int ret = -EINVAL;
int fd;
fd = open(test->device, O_RDWR);
if (fd < 0) {
perror("can't open PCI Endpoint Test device");
- return;
+ return -ENODEV;
}
if (test->barnum >= 0 && test->barnum <= 5) {
@@ -223,7 +223,7 @@ usage:
"\t-r Read buffer test\n"
"\t-w Write buffer test\n"
"\t-c Copy buffer test\n"
- "\t-s <size> Size of buffer {default: 100KB}\n",
+ "\t-s <size> Size of buffer {default: 100KB}\n"
"\t-h Print this help message\n",
argv[0]);
return -EINVAL;