From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754913AbcBZV2P (ORCPT ); Fri, 26 Feb 2016 16:28:15 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:58595 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751975AbcBZV2O (ORCPT ); Fri, 26 Feb 2016 16:28:14 -0500 Date: Fri, 26 Feb 2016 13:28:12 -0800 From: Andrew Morton To: Arnd Bergmann Cc: linux-arm-kernel@lists.infradead.org, Dave Hansen , linux-mm@kvack.org, Greg Kroah-Hartman , Jin Qian , linux-kernel@vger.kernel.org, Ingo Molnar Subject: Re: [PATCH] staging/goldfish: use 6-arg get_user_pages() Message-Id: <20160226132812.a81d46c0151cb47f9433909f@linux-foundation.org> In-Reply-To: <1456488033-4044939-1-git-send-email-arnd@arndb.de> References: <1456488033-4044939-1-git-send-email-arnd@arndb.de> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 26 Feb 2016 12:59:43 +0100 Arnd Bergmann 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 > --- > 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 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 Cc: Dave Hansen Cc: Ingo Molnar Signed-off-by: Andrew Morton --- 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(¤t->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(¤t->mm->mmap_sem); if (ret < 0) break; _