Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757425AbdLXFvx (ORCPT ); Sun, 24 Dec 2017 00:51:53 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:2774 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752364AbdLXFuY (ORCPT ); Sun, 24 Dec 2017 00:50:24 -0500 From: Tan Xiaojun To: , , , , , , , , , , , , , CC: , , , Subject: [PATCH 12/12] drm/ttm: unexport ttm_bo_default_io_mem_pfn and make it static Date: Sun, 24 Dec 2017 14:14:28 +0800 Message-ID: <1514096068-80414-13-git-send-email-tanxiaojun@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1514096068-80414-1-git-send-email-tanxiaojun@huawei.com> References: <1514096068-80414-1-git-send-email-tanxiaojun@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.38] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2367 Lines: 74 No one will use this function except in ttm_bo_vm.c now. So unexport it and make it static. Signed-off-by: Tan Xiaojun --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 23 +++++++++++++++-------- include/drm/ttm/ttm_bo_api.h | 11 ----------- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c index e25a99b..ff70fc96 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c @@ -92,6 +92,21 @@ static int ttm_bo_vm_fault_idle(struct ttm_buffer_object *bo, return ret; } +/** + * ttm_bo_default_iomem_pfn - get a pfn for a page offset + * + * @bo: the BO we need to look up the pfn for + * @page_offset: offset inside the BO to look up. + * + * Calculate the PFN for iomem based mappings during page fault + */ +static unsigned long ttm_bo_default_io_mem_pfn(struct ttm_buffer_object *bo, + unsigned long page_offset) +{ + return ((bo->mem.bus.base + bo->mem.bus.offset) >> PAGE_SHIFT) + + page_offset; +} + static int ttm_bo_vm_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; @@ -407,14 +422,6 @@ static struct ttm_buffer_object *ttm_bo_vm_lookup(struct ttm_bo_device *bdev, return bo; } -unsigned long ttm_bo_default_io_mem_pfn(struct ttm_buffer_object *bo, - unsigned long page_offset) -{ - return ((bo->mem.bus.base + bo->mem.bus.offset) >> PAGE_SHIFT) - + page_offset; -} -EXPORT_SYMBOL(ttm_bo_default_io_mem_pfn); - int ttm_bo_mmap(struct file *filp, struct vm_area_struct *vma, struct ttm_bo_device *bdev) { diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h index fa07be1..0b1ce05 100644 --- a/include/drm/ttm/ttm_bo_api.h +++ b/include/drm/ttm/ttm_bo_api.h @@ -711,17 +711,6 @@ extern int ttm_fbdev_mmap(struct vm_area_struct *vma, struct ttm_buffer_object *bo); /** - * ttm_bo_default_iomem_pfn - get a pfn for a page offset - * - * @bo: the BO we need to look up the pfn for - * @page_offset: offset inside the BO to look up. - * - * Calculate the PFN for iomem based mappings during page fault - */ -unsigned long ttm_bo_default_io_mem_pfn(struct ttm_buffer_object *bo, - unsigned long page_offset); - -/** * ttm_bo_mmap - mmap out of the ttm device address space. * * @filp: filp as input from the mmap method. -- 2.7.4