From patchwork Fri Feb 26 21:28:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 8441941 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C10D7C0553 for ; Fri, 26 Feb 2016 21:30:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D895A203AD for ; Fri, 26 Feb 2016 21:30:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F395F2038F for ; Fri, 26 Feb 2016 21:30:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aZPwE-00057J-PQ; Fri, 26 Feb 2016 21:28:38 +0000 Received: from mail.linuxfoundation.org ([140.211.169.12]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aZPwA-0004yN-N4 for linux-arm-kernel@lists.infradead.org; Fri, 26 Feb 2016 21:28:36 +0000 Received: from akpm3.mtv.corp.google.com (unknown [104.132.1.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4DC1DDD2; Fri, 26 Feb 2016 21:28:13 +0000 (UTC) Date: Fri, 26 Feb 2016 13:28:12 -0800 From: Andrew Morton To: Arnd Bergmann 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160226_132834_810221_3E9445B8 X-CRM114-Status: GOOD ( 14.61 ) X-Spam-Score: -4.2 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Dave Hansen , Greg Kroah-Hartman , Jin Qian , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Ingo Molnar , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;