linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] staging/goldfish: use 6-arg get_user_pages()
@ 2016-02-26 11:59 Arnd Bergmann
  2016-02-26 21:28 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2016-02-26 11:59 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-arm-kernel, Dave Hansen, linux-mm, Arnd Bergmann,
	Greg Kroah-Hartman, Jin Qian, linux-kernel

After commit cde70140fed8 ("mm/gup: Overload get_user_pages() functions"),
we get warning for this file, as it calls get_user_pages() with eight
arguments after the change of the calling convention to use only six:

drivers/platform/goldfish/goldfish_pipe.c: In function 'goldfish_pipe_read_write':
drivers/platform/goldfish/goldfish_pipe.c:312:3: error: 'get_user_pages8' is deprecated [-Werror=deprecated-declarations]

This removes the first two arguments, which are now the default.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
The API change is currently only in the mm/pkeys branch of the
tip tree, while the goldfish_pipe driver started using the
old API in the staging/next branch.

Andrew could pick it up into linux-mm in the meantime, or I can
resend it at some later point if nobody else does the change
after 4.6-rc1.
---
 drivers/platform/goldfish/goldfish_pipe.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index 9973cebb4d6f..07462d79d040 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -309,8 +309,7 @@ static ssize_t goldfish_pipe_read_write(struct file *filp, char __user *buffer,
 		 * much memory to the process.
 		 */
 		down_read(&current->mm->mmap_sem);
-		ret = get_user_pages(current, current->mm, address, 1,
-				     !is_write, 0, &page, NULL);
+		ret = get_user_pages(address, 1, !is_write, 0, &page, NULL);
 		up_read(&current->mm->mmap_sem);
 		if (ret < 0)
 			break;
-- 
2.7.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] staging/goldfish: use 6-arg get_user_pages()
  2016-02-26 11:59 [PATCH] staging/goldfish: use 6-arg get_user_pages() Arnd Bergmann
@ 2016-02-26 21:28 ` Andrew Morton
  2016-02-29 10:09   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2016-02-26 21:28 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-arm-kernel, Dave Hansen, linux-mm, Greg Kroah-Hartman,
	Jin Qian, linux-kernel, Ingo Molnar

On Fri, 26 Feb 2016 12:59:43 +0100 Arnd Bergmann <arnd@arndb.de> wrote:

> After commit cde70140fed8 ("mm/gup: Overload get_user_pages() functions"),
> we get warning for this file, as it calls get_user_pages() with eight
> arguments after the change of the calling convention to use only six:
> 
> drivers/platform/goldfish/goldfish_pipe.c: In function 'goldfish_pipe_read_write':
> drivers/platform/goldfish/goldfish_pipe.c:312:3: error: 'get_user_pages8' is deprecated [-Werror=deprecated-declarations]
> 
> This removes the first two arguments, which are now the default.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> The API change is currently only in the mm/pkeys branch of the
> tip tree, while the goldfish_pipe driver started using the
> old API in the staging/next branch.
> 
> Andrew could pick it up into linux-mm in the meantime, or I can
> resend it at some later point if nobody else does the change
> after 4.6-rc1.

This is one for Ingo.

From: Arnd Bergmann <arnd@arndb.de>
Subject: staging/goldfish: use 6-arg get_user_pages()

After commit cde70140fed8 ("mm/gup: Overload get_user_pages() functions"),
we get warning for this file, as it calls get_user_pages() with eight
arguments after the change of the calling convention to use only six:

drivers/platform/goldfish/goldfish_pipe.c: In function 'goldfish_pipe_read_write':
drivers/platform/goldfish/goldfish_pipe.c:312:3: error: 'get_user_pages8' is deprecated [-Werror=deprecated-declarations]

This removes the first two arguments, which are now the default.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/platform/goldfish/goldfish_pipe.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff -puN drivers/platform/goldfish/goldfish_pipe.c~staging-goldfish-use-6-arg-get_user_pages drivers/platform/goldfish/goldfish_pipe.c
--- a/drivers/platform/goldfish/goldfish_pipe.c~staging-goldfish-use-6-arg-get_user_pages
+++ a/drivers/platform/goldfish/goldfish_pipe.c
@@ -309,8 +309,7 @@ static ssize_t goldfish_pipe_read_write(
 		 * much memory to the process.
 		 */
 		down_read(&current->mm->mmap_sem);
-		ret = get_user_pages(current, current->mm, address, 1,
-				     !is_write, 0, &page, NULL);
+		ret = get_user_pages(address, 1, !is_write, 0, &page, NULL);
 		up_read(&current->mm->mmap_sem);
 		if (ret < 0)
 			break;
_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

* Re: [PATCH] staging/goldfish: use 6-arg get_user_pages()
  2016-02-26 21:28 ` Andrew Morton
@ 2016-02-29 10:09   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-02-29 10:09 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Andrew Morton, Dave Hansen, Greg Kroah-Hartman, Jin Qian,
	linux-kernel, linux-mm, Ingo Molnar

On Friday 26 February 2016 13:28:12 Andrew Morton wrote:
> On Fri, 26 Feb 2016 12:59:43 +0100 Arnd Bergmann <arnd@arndb.de> wrote:
> > The API change is currently only in the mm/pkeys branch of the
> > tip tree, while the goldfish_pipe driver started using the
> > old API in the staging/next branch.
> >
> > Andrew could pick it up into linux-mm in the meantime, or I can
> > resend it at some later point if nobody else does the change
> > after 4.6-rc1.
> 
> This is one for Ingo.
> 
...
> 
> This removes the first two arguments, which are now the default.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Ingo Molnar <mingo@elte.hu>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

As mentioned in my comment above, the patch can only get added
after the staging/next tree has also been merged, which I think
Ingo doesn't want to add to the tip tree.

	Arnd

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

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

end of thread, other threads:[~2016-02-29 10:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-26 11:59 [PATCH] staging/goldfish: use 6-arg get_user_pages() Arnd Bergmann
2016-02-26 21:28 ` Andrew Morton
2016-02-29 10:09   ` Arnd Bergmann

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