* [PATCH 0/2] tools: Fixes for pcitest
@ 2019-04-04 11:06 Kishon Vijay Abraham I
2019-04-04 11:06 ` [PATCH 1/2] tools: PCI: Add 'h' in optstring of getopt() Kishon Vijay Abraham I
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kishon Vijay Abraham I @ 2019-04-04 11:06 UTC (permalink / raw)
To: Lorenzo Pieralisi; +Cc: linux-pci, linux-kernel, Kishon Vijay Abraham I
Hi Lorenzo,
This series includes a couple of patches, one which fixes
inadvertent removal of pcitest.sh from kernel repo when
doing a "clean" and other lets the user use 'h' option to
display the list of options supported by pcitest.
Thanks
Kishon
Kishon Vijay Abraham I (2):
tools: PCI: Add 'h' in optstring of getopt()
tools: PCI: Handle pcitest.sh independently from pcitest
tools/pci/Makefile | 8 +++++++-
tools/pci/pcitest.c | 4 ++--
2 files changed, 9 insertions(+), 3 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] tools: PCI: Add 'h' in optstring of getopt()
2019-04-04 11:06 [PATCH 0/2] tools: Fixes for pcitest Kishon Vijay Abraham I
@ 2019-04-04 11:06 ` Kishon Vijay Abraham I
2019-04-04 11:06 ` [PATCH 2/2] tools: PCI: Handle pcitest.sh independently from pcitest Kishon Vijay Abraham I
2019-04-11 9:28 ` [PATCH 0/2] tools: Fixes for pcitest Lorenzo Pieralisi
2 siblings, 0 replies; 4+ messages in thread
From: Kishon Vijay Abraham I @ 2019-04-04 11:06 UTC (permalink / raw)
To: Lorenzo Pieralisi
Cc: linux-pci, linux-kernel, Kishon Vijay Abraham I, Sekhar Nori
'h' is a valid option character for pcitest utility used to print
the pcitest usage. Add 'h' in optstring of getopt() in order to get
rid of "pcitest: invalid option -- 'h'" warning. While at that remove
unncessary case '?'.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
tools/pci/pcitest.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c
index ec4d51f3308b..34d71f7d3b12 100644
--- a/tools/pci/pcitest.c
+++ b/tools/pci/pcitest.c
@@ -162,7 +162,7 @@ int main(int argc, char **argv)
/* set default endpoint device */
test->device = "/dev/pci-endpoint-test.0";
- while ((c = getopt(argc, argv, "D:b:m:x:i:Ilrwcs:")) != EOF)
+ while ((c = getopt(argc, argv, "D:b:m:x:i:Ilhrwcs:")) != EOF)
switch (c) {
case 'D':
test->device = optarg;
@@ -206,7 +206,6 @@ int main(int argc, char **argv)
case 's':
test->size = strtoul(optarg, NULL, 0);
continue;
- case '?':
case 'h':
default:
usage:
@@ -224,6 +223,7 @@ int main(int argc, char **argv)
"\t-w Write buffer test\n"
"\t-c Copy buffer test\n"
"\t-s <size> Size of buffer {default: 100KB}\n",
+ "\t-h Print this help message\n",
argv[0]);
return -EINVAL;
}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] tools: PCI: Handle pcitest.sh independently from pcitest
2019-04-04 11:06 [PATCH 0/2] tools: Fixes for pcitest Kishon Vijay Abraham I
2019-04-04 11:06 ` [PATCH 1/2] tools: PCI: Add 'h' in optstring of getopt() Kishon Vijay Abraham I
@ 2019-04-04 11:06 ` Kishon Vijay Abraham I
2019-04-11 9:28 ` [PATCH 0/2] tools: Fixes for pcitest Lorenzo Pieralisi
2 siblings, 0 replies; 4+ messages in thread
From: Kishon Vijay Abraham I @ 2019-04-04 11:06 UTC (permalink / raw)
To: Lorenzo Pieralisi
Cc: linux-pci, linux-kernel, Kishon Vijay Abraham I, Gustavo Pimentel
Handling pcitest.sh along with pcitest (obtained by compiling
pcitest.c) results in pcitest.sh getting removed inadvertently
while "make -C tools/pci clean". Fix it here by handling
pcitest.sh independently of pcitest.
Fixes: 1ce78ce09430a5f ("tools: PCI: Change pcitest compiling
process")
Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Reported-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
tools/pci/Makefile | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/pci/Makefile b/tools/pci/Makefile
index 46e4c2f318c9..9b7534457060 100644
--- a/tools/pci/Makefile
+++ b/tools/pci/Makefile
@@ -14,9 +14,12 @@ MAKEFLAGS += -r
CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include
-ALL_TARGETS := pcitest pcitest.sh
+ALL_TARGETS := pcitest
ALL_PROGRAMS := $(patsubst %,$(OUTPUT)%,$(ALL_TARGETS))
+SCRIPTS := pcitest.sh
+ALL_SCRIPTS := $(patsubst %,$(OUTPUT)%,$(SCRIPTS))
+
all: $(ALL_PROGRAMS)
export srctree OUTPUT CC LD CFLAGS
@@ -46,6 +49,9 @@ install: $(ALL_PROGRAMS)
install -d -m 755 $(DESTDIR)$(bindir); \
for program in $(ALL_PROGRAMS); do \
install $$program $(DESTDIR)$(bindir); \
+ done; \
+ for script in $(ALL_SCRIPTS); do \
+ install $$script $(DESTDIR)$(bindir); \
done
FORCE:
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] tools: Fixes for pcitest
2019-04-04 11:06 [PATCH 0/2] tools: Fixes for pcitest Kishon Vijay Abraham I
2019-04-04 11:06 ` [PATCH 1/2] tools: PCI: Add 'h' in optstring of getopt() Kishon Vijay Abraham I
2019-04-04 11:06 ` [PATCH 2/2] tools: PCI: Handle pcitest.sh independently from pcitest Kishon Vijay Abraham I
@ 2019-04-11 9:28 ` Lorenzo Pieralisi
2 siblings, 0 replies; 4+ messages in thread
From: Lorenzo Pieralisi @ 2019-04-11 9:28 UTC (permalink / raw)
To: Kishon Vijay Abraham I; +Cc: linux-pci, linux-kernel
On Thu, Apr 04, 2019 at 04:36:07PM +0530, Kishon Vijay Abraham I wrote:
> Hi Lorenzo,
>
> This series includes a couple of patches, one which fixes
> inadvertent removal of pcitest.sh from kernel repo when
> doing a "clean" and other lets the user use 'h' option to
> display the list of options supported by pcitest.
>
> Thanks
> Kishon
>
> Kishon Vijay Abraham I (2):
> tools: PCI: Add 'h' in optstring of getopt()
> tools: PCI: Handle pcitest.sh independently from pcitest
>
> tools/pci/Makefile | 8 +++++++-
> tools/pci/pcitest.c | 4 ++--
> 2 files changed, 9 insertions(+), 3 deletions(-)
Applied to pci/misc for v5.2, thanks.
Lorenzo
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-04-11 9:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-04 11:06 [PATCH 0/2] tools: Fixes for pcitest Kishon Vijay Abraham I
2019-04-04 11:06 ` [PATCH 1/2] tools: PCI: Add 'h' in optstring of getopt() Kishon Vijay Abraham I
2019-04-04 11:06 ` [PATCH 2/2] tools: PCI: Handle pcitest.sh independently from pcitest Kishon Vijay Abraham I
2019-04-11 9:28 ` [PATCH 0/2] tools: Fixes for pcitest Lorenzo Pieralisi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).