linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] gup.c, gup_benchmark.c trivial fixes before the storm
@ 2019-10-13 22:11 John Hubbard
  2019-10-13 22:11 ` [PATCH 1/2] mm/gup_benchmark: add a missing "w" to getopt string John Hubbard
  0 siblings, 1 reply; 3+ messages in thread
From: John Hubbard @ 2019-10-13 22:11 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Christoph Hellwig, Aneesh Kumar K . V, Keith Busch, Ira Weiny,
	LKML, linux-mm, John Hubbard, Christoph Hellwig,
	Kirill A . Shutemov, Shuah Khan, linux-kselftest

Hi,

These trivial fixes apply to today's linux.git (5.4-rc3, or maybe -rc4, by
the time I send this).

I found these while polishing up the Next And Final get_user_pages()+dma
tracking patchset (which is in final testing and passing nicely...so far).

Anyway, as these two patches apply cleanly both before and after the larger
gup/dma upcoming patchset, I thought it best to send this out separately,
in order to avoid muddying the waters more than usual.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org


John Hubbard (2):
  mm/gup_benchmark: add a missing "w" to getopt string
  mm/gup: fix a misnamed "write" argument: should be "flags"

 mm/gup.c                                   | 12 +++++++-----
 tools/testing/selftests/vm/gup_benchmark.c |  2 +-
 2 files changed, 8 insertions(+), 6 deletions(-)

-- 
2.23.0


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

* [PATCH 1/2] mm/gup_benchmark: add a missing "w" to getopt string
  2019-10-13 22:11 [PATCH 0/2] gup.c, gup_benchmark.c trivial fixes before the storm John Hubbard
@ 2019-10-13 22:11 ` John Hubbard
  2019-10-14 13:36   ` Kirill A. Shutemov
  0 siblings, 1 reply; 3+ messages in thread
From: John Hubbard @ 2019-10-13 22:11 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Christoph Hellwig, Aneesh Kumar K . V, Keith Busch, Ira Weiny,
	LKML, linux-mm, John Hubbard, Kirill A . Shutemov, Shuah Khan,
	linux-kselftest

Even though gup_benchmark.c has code to handle the -w
command-line option, the "w" is not part of the getopt
string. It looks as if it has been missing the whole time.

On my machine, this leads naturally to the following
predictable result:

$ sudo ./gup_benchmark -w
./gup_benchmark: invalid option -- 'w'

...which is fixed, with this commit.

Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
---
 tools/testing/selftests/vm/gup_benchmark.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/vm/gup_benchmark.c b/tools/testing/selftests/vm/gup_benchmark.c
index c0534e298b51..cb3fc09645c4 100644
--- a/tools/testing/selftests/vm/gup_benchmark.c
+++ b/tools/testing/selftests/vm/gup_benchmark.c
@@ -37,7 +37,7 @@ int main(int argc, char **argv)
 	char *file = "/dev/zero";
 	char *p;
 
-	while ((opt = getopt(argc, argv, "m:r:n:f:tTLUSH")) != -1) {
+	while ((opt = getopt(argc, argv, "m:r:n:f:tTLUwSH")) != -1) {
 		switch (opt) {
 		case 'm':
 			size = atoi(optarg) * MB;
-- 
2.23.0


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

* Re: [PATCH 1/2] mm/gup_benchmark: add a missing "w" to getopt string
  2019-10-13 22:11 ` [PATCH 1/2] mm/gup_benchmark: add a missing "w" to getopt string John Hubbard
@ 2019-10-14 13:36   ` Kirill A. Shutemov
  0 siblings, 0 replies; 3+ messages in thread
From: Kirill A. Shutemov @ 2019-10-14 13:36 UTC (permalink / raw)
  To: John Hubbard
  Cc: Andrew Morton, Christoph Hellwig, Aneesh Kumar K . V,
	Keith Busch, Ira Weiny, LKML, linux-mm, Kirill A . Shutemov,
	Shuah Khan, linux-kselftest

On Sun, Oct 13, 2019 at 03:11:54PM -0700, John Hubbard wrote:
> Even though gup_benchmark.c has code to handle the -w
> command-line option, the "w" is not part of the getopt
> string. It looks as if it has been missing the whole time.
> 
> On my machine, this leads naturally to the following
> predictable result:
> 
> $ sudo ./gup_benchmark -w
> ./gup_benchmark: invalid option -- 'w'
> 
> ...which is fixed, with this commit.
> 
> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> Cc: Keith Busch <keith.busch@intel.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: linux-kselftest@vger.kernel.org
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>

Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>

-- 
 Kirill A. Shutemov

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

end of thread, other threads:[~2019-10-14 13:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-13 22:11 [PATCH 0/2] gup.c, gup_benchmark.c trivial fixes before the storm John Hubbard
2019-10-13 22:11 ` [PATCH 1/2] mm/gup_benchmark: add a missing "w" to getopt string John Hubbard
2019-10-14 13:36   ` Kirill A. Shutemov

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).