Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1542362iob; Fri, 29 Apr 2022 07:34:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJGV8bLfnnRhzsVAAl3GYiXGSFlv62rN8bv4YDF8jTOmcw3n7MVx8xKbK0/lliorlDCeQp X-Received: by 2002:a05:6a00:1c42:b0:50d:4bfa:2b19 with SMTP id s2-20020a056a001c4200b0050d4bfa2b19mr21999670pfw.8.1651242840367; Fri, 29 Apr 2022 07:34:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651242840; cv=none; d=google.com; s=arc-20160816; b=WwGlATJf/CvZ0e1PRyJdJ0b7qiSJtN7wiSw+bdWO5pXgbKFtflRFq0TN2Zdcw3Y7YY Wce4iXNpJWrOHwg6nA9EMfh7kK8lclDYfqr2AgKFjaxb3QElBCWgfcXfLhJsxiefDmN6 3vv7bLD2kON0n9HHsVywMbKqNPGZ0d8vYHjudMZ2zdvsnbVf7ozGMfH71HeDpihD2nyD SPTdxl57kxLSotxHTDzRSfh/YQUI+fPSO2KTlQ59eJEYhEQI7krvRcI/rQcMc/h66Ku7 PbnYbWBUhRqtK8f12iNI/kyLRe02/4sf+mLW2p//tgF4xNWpxIOPGTmoHYHnJ2c3abRU GGdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=oM/mhDtYgrTfoqWHcDfm1oQ6TI+8agMAO+j/ubn1fLc=; b=VudnZnr9v4qpgCVekWYfa7I962wd80qS6xccAlmb34YIsqMSEMrG0ksu9iH2uN7lHD XE84OsQfuNxHyzn43JsYbqDTT76wj6Ng2Bvzwmw9yp9/TWiSLGRhMxCuMRD7BWBC3z6K jQ0oby0fantmYAtuWIJ246J5Jocc/R189ZVGKwFR1TUeErElpVwlxi7Uk17M6Ayk3YNx ig3nRpsAu7MgvXs3pqoE9CKPQbGaPxzRWTCQE8oRxo9twaSlNOaQCswPHFrcMY6QXwZL NaYR6kw58AhshPMx5xWYOeftSOP50BWSwyNOiFzY8ORXiepKBUc9QDNAjK/Pj6L/vX21 KHxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=QFjsWJOl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ei23-20020a17090ae55700b001cba3b7d546si10267683pjb.188.2022.04.29.07.33.42; Fri, 29 Apr 2022 07:34:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=QFjsWJOl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346354AbiD1MhV (ORCPT + 99 others); Thu, 28 Apr 2022 08:37:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346385AbiD1MhS (ORCPT ); Thu, 28 Apr 2022 08:37:18 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A972DAFADD for ; Thu, 28 Apr 2022 05:33:59 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id e2so6583996wrh.7 for ; Thu, 28 Apr 2022 05:33:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=oM/mhDtYgrTfoqWHcDfm1oQ6TI+8agMAO+j/ubn1fLc=; b=QFjsWJOlqR+0ZVt8NYJ+S/caZI3wMRsvdf5luivf3r9b3TOTg8jOxqcs7+oxnyUENI 5QdlvMdqDxO/q5fmRIgPkMqki7Yx6mTzhjfvC0MwrxuozgeDajkjYApi21QWMPQjayjA cAcvWqQlh2+AVQ0W8SppkQa9DBc9c66zwFwww= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=oM/mhDtYgrTfoqWHcDfm1oQ6TI+8agMAO+j/ubn1fLc=; b=Tmt86LFZ+luvjQROtiwHTQPYtYQXqmp6fXDSgcDVDaYBQPfo811X5kmzRPo9qCCPCX W32Lz8X9OiCKNrF2FsycmJ+s1RrHnK25ovgUlUk66kTTXbOAW0xJ8rrZZKPMDu/DjrC/ yhnXBuhkmKLrbaMCgev+V7MW7dKTAm51FH9plpJDYtqraJGB788ZUiYX8sxf+d0d8b6e R8I9gHprnc0M0zN06BYovda+6h3fDNF44WF3QhXK0TGSTeq4y+rV6jvfdV8e5TmijzLG gpxIEmbVWBZsZI7FhGdIkIoRlsPeYT3Av2KzyeZ7sEzZPDZWWFu0ZyO3uH+6ONsGYuM/ Bgfg== X-Gm-Message-State: AOAM530HxFDv8baDUuNqDBMUIjBumislQdAjq7vuySWlpMZvi2Kk5HRW /jja7gd3qdIXftxQsKV5PvzPZA== X-Received: by 2002:a05:6000:1883:b0:205:c0cb:33c6 with SMTP id a3-20020a056000188300b00205c0cb33c6mr27531231wri.39.1651149238107; Thu, 28 Apr 2022 05:33:58 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id f66-20020a1c3845000000b00393e84ea043sm4015952wma.44.2022.04.28.05.33.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Apr 2022 05:33:57 -0700 (PDT) Date: Thu, 28 Apr 2022 14:33:55 +0200 From: Daniel Vetter To: Dmitry Osipenko Cc: David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gert Wollny , Gustavo Padovan , Daniel Stone , Tomeu Vizoso , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Steven Price , Alyssa Rosenzweig , Rob Clark , Emil Velikov , Robin Murphy , Qiang Yu , Sumit Semwal , Christian =?iso-8859-1?Q?K=F6nig?= , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Dmitry Osipenko Subject: Re: [PATCH v5 15/17] drm/shmem-helper: Make drm_gem_shmem_get_pages() private Message-ID: Mail-Followup-To: Dmitry Osipenko , David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Almeida , Gert Wollny , Gustavo Padovan , Daniel Stone , Tomeu Vizoso , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Steven Price , Alyssa Rosenzweig , Rob Clark , Emil Velikov , Robin Murphy , Qiang Yu , Sumit Semwal , Christian =?iso-8859-1?Q?K=F6nig?= , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Dmitry Osipenko References: <20220424190424.540501-1-dmitry.osipenko@collabora.com> <20220424190424.540501-16-dmitry.osipenko@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220424190424.540501-16-dmitry.osipenko@collabora.com> X-Operating-System: Linux phenom 5.10.0-8-amd64 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 24, 2022 at 10:04:22PM +0300, Dmitry Osipenko wrote: > VirtIO-GPU driver was the only user of drm_gem_shmem_get_pages() > and it now uses drm_gem_shmem_get_pages_sgt(). Make the get_pages() > private to drm_gem_shmem_helper. > > Signed-off-by: Dmitry Osipenko > --- > drivers/gpu/drm/drm_gem_shmem_helper.c | 3 +-- > include/drm/drm_gem_shmem_helper.h | 1 - > 2 files changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c > index 25e9bc2803ee..7ec5f8002f68 100644 > --- a/drivers/gpu/drm/drm_gem_shmem_helper.c > +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c > @@ -490,7 +490,7 @@ static int drm_gem_shmem_get_pages_locked(struct drm_gem_shmem_object *shmem) > * Returns: > * 0 on success or a negative error code on failure. > */ We also delete the kerneldoc for functions not exported (kerneldoc is geared towards driver writes). If there's anything critical the comment explains about the internals, you can keep that as a normal C style comment without the /** but generally there's no need for these anymore. -Daniel > -int drm_gem_shmem_get_pages(struct drm_gem_shmem_object *shmem) > +static int drm_gem_shmem_get_pages(struct drm_gem_shmem_object *shmem) > { > int ret; > > @@ -507,7 +507,6 @@ int drm_gem_shmem_get_pages(struct drm_gem_shmem_object *shmem) > > return ret; > } > -EXPORT_SYMBOL(drm_gem_shmem_get_pages); > > static void drm_gem_shmem_get_pages_no_fail(struct drm_gem_shmem_object *shmem) > { > diff --git a/include/drm/drm_gem_shmem_helper.h b/include/drm/drm_gem_shmem_helper.h > index 638cb16a4576..5b351933c293 100644 > --- a/include/drm/drm_gem_shmem_helper.h > +++ b/include/drm/drm_gem_shmem_helper.h > @@ -180,7 +180,6 @@ struct drm_gem_shmem_object { > struct drm_gem_shmem_object *drm_gem_shmem_create(struct drm_device *dev, size_t size); > void drm_gem_shmem_free(struct drm_gem_shmem_object *shmem); > > -int drm_gem_shmem_get_pages(struct drm_gem_shmem_object *shmem); > void drm_gem_shmem_put_pages(struct drm_gem_shmem_object *shmem); > int drm_gem_shmem_pin(struct drm_gem_shmem_object *shmem); > void drm_gem_shmem_unpin(struct drm_gem_shmem_object *shmem); > -- > 2.35.1 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch