From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CCE8ECA9ED3 for ; Mon, 4 Nov 2019 16:52:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A42202080F for ; Mon, 4 Nov 2019 16:52:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WSLa2wKr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728789AbfKDQwj (ORCPT ); Mon, 4 Nov 2019 11:52:39 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:54293 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728489AbfKDQwh (ORCPT ); Mon, 4 Nov 2019 11:52:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572886356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6ta56jBRT26o2oAigonInJcC04rruT/2d6fabGOKHyw=; b=WSLa2wKrL8g5aDyoDf02O4k+crqcoTXsQ2EKqq2n6FzaTjqceXHOvCayOCIR1bb5K9cevY 4X65fFvcBOCVsRohJoclItex595rU3tYdNhZDQ5rVUFYp7EKSwdA9oE4gxRYhiG3A8fEqR fFQB7XsZgwY/SgZNM9uNmH3+34EtSUE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-285-9yNyzIkfPeqtWSV5Ovvavg-1; Mon, 04 Nov 2019 11:52:32 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8FC0C800C73; Mon, 4 Nov 2019 16:52:28 +0000 (UTC) Received: from redhat.com (unknown [10.20.6.178]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3A10B5C1B2; Mon, 4 Nov 2019 16:52:23 +0000 (UTC) Date: Mon, 4 Nov 2019 11:52:21 -0500 From: Jerome Glisse To: John Hubbard Cc: Andrew Morton , Al Viro , Alex Williamson , Benjamin Herrenschmidt , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Christoph Hellwig , Dan Williams , Daniel Vetter , Dave Chinner , David Airlie , "David S . Miller" , Ira Weiny , Jan Kara , Jason Gunthorpe , Jens Axboe , Jonathan Corbet , Magnus Karlsson , Mauro Carvalho Chehab , Michael Ellerman , Michal Hocko , Mike Kravetz , Paul Mackerras , Shuah Khan , Vlastimil Babka , bpf@vger.kernel.org, dri-devel@lists.freedesktop.org, kvm@vger.kernel.org, linux-block@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-media@vger.kernel.org, linux-rdma@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org, linux-mm@kvack.org, LKML Subject: Re: [PATCH v2 03/18] goldish_pipe: rename local pin_user_pages() routine Message-ID: <20191104165221.GC5134@redhat.com> References: <20191103211813.213227-1-jhubbard@nvidia.com> <20191103211813.213227-4-jhubbard@nvidia.com> MIME-Version: 1.0 In-Reply-To: <20191103211813.213227-4-jhubbard@nvidia.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: 9yNyzIkfPeqtWSV5Ovvavg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Sun, Nov 03, 2019 at 01:17:58PM -0800, John Hubbard wrote: > 1. Avoid naming conflicts: rename local static function from > "pin_user_pages()" to "pin_goldfish_pages()". >=20 > An upcoming patch will introduce a global pin_user_pages() > function. >=20 > Reviewed-by: Ira Weiny > Signed-off-by: John Hubbard Reviewed-by: J=E9r=F4me Glisse > --- > drivers/platform/goldfish/goldfish_pipe.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) >=20 > diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform= /goldfish/goldfish_pipe.c > index cef0133aa47a..7ed2a21a0bac 100644 > --- a/drivers/platform/goldfish/goldfish_pipe.c > +++ b/drivers/platform/goldfish/goldfish_pipe.c > @@ -257,12 +257,12 @@ static int goldfish_pipe_error_convert(int status) > =09} > } > =20 > -static int pin_user_pages(unsigned long first_page, > -=09=09=09 unsigned long last_page, > -=09=09=09 unsigned int last_page_size, > -=09=09=09 int is_write, > -=09=09=09 struct page *pages[MAX_BUFFERS_PER_COMMAND], > -=09=09=09 unsigned int *iter_last_page_size) > +static int pin_goldfish_pages(unsigned long first_page, > +=09=09=09 unsigned long last_page, > +=09=09=09 unsigned int last_page_size, > +=09=09=09 int is_write, > +=09=09=09 struct page *pages[MAX_BUFFERS_PER_COMMAND], > +=09=09=09 unsigned int *iter_last_page_size) > { > =09int ret; > =09int requested_pages =3D ((last_page - first_page) >> PAGE_SHIFT) + 1; > @@ -354,9 +354,9 @@ static int transfer_max_buffers(struct goldfish_pipe = *pipe, > =09if (mutex_lock_interruptible(&pipe->lock)) > =09=09return -ERESTARTSYS; > =20 > -=09pages_count =3D pin_user_pages(first_page, last_page, > -=09=09=09=09 last_page_size, is_write, > -=09=09=09=09 pipe->pages, &iter_last_page_size); > +=09pages_count =3D pin_goldfish_pages(first_page, last_page, > +=09=09=09=09=09 last_page_size, is_write, > +=09=09=09=09=09 pipe->pages, &iter_last_page_size); > =09if (pages_count < 0) { > =09=09mutex_unlock(&pipe->lock); > =09=09return pages_count; > --=20 > 2.23.0 >=20