Commit 31d5a608 authored by Bjorn Helgaas's avatar Bjorn Helgaas

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
parents 950cfbf0 af336630
......@@ -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
......
......@@ -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 @@ int main(int argc, char **argv)
"\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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment