From patchwork Mon Jan 6 15:01:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rashika X-Patchwork-Id: 3444051 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DCB8F9F2E9 for ; Tue, 7 Jan 2014 00:49:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 238752016D for ; Tue, 7 Jan 2014 00:49:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 53F0B2016C for ; Tue, 7 Jan 2014 00:49:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B2DCA10868D; Mon, 6 Jan 2014 16:49:05 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by gabe.freedesktop.org (Postfix) with ESMTP id 7205810600F for ; Mon, 6 Jan 2014 07:01:47 -0800 (PST) Received: by mail-pa0-f43.google.com with SMTP id bj1so18679083pad.30 for ; Mon, 06 Jan 2014 07:01:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=5yRR3ayoRhXQjPZNSdlIbTK/gLGpw+CV3WKQd+SWEK0=; b=QGWtaE+Me9DPULxCxve/mkfsbUgyCvaUjx2OvPE9arJD5s4u5IrxMAazRwtQzdDzND fsh7jQXGfoaPRvSL6sn0RpBkPQ4m4mhAc+9ST2Zak9tQi4KdHGvBdFCQp7zX0V8S5YWF TlQtlcNG8plcPnq2L8+UpGfxWlaALntRfztmX0Wf2M1SmsYlOY8ArdvVEApIfhoJ4gJK h+odkAsdHXC+JRbSzw/hU3iUPQIv/ZmjNBwnQpDoHBp3mI3/PLMYP+cMOokatzX4mTHZ Z5CbPyfbfjpLsG8ohQ0Gyt8nOi6pLV34muzVfolqgMg0vQSBR5643bMESscmvC7P1vHJ /PKg== X-Received: by 10.68.89.162 with SMTP id bp2mr8354536pbb.151.1389020506929; Mon, 06 Jan 2014 07:01:46 -0800 (PST) Received: from rashika ([14.139.82.6]) by mx.google.com with ESMTPSA id qq5sm56275349pbb.24.2014.01.06.07.01.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 06 Jan 2014 07:01:45 -0800 (PST) Date: Mon, 6 Jan 2014 20:31:42 +0530 From: Rashika Kheria To: linux-kernel@vger.kernel.org Subject: [PATCH 07/85] drivers: gpu: Mark functions as static and remove unused function in cirrus_ttm.c Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Mon, 06 Jan 2014 16:48:58 -0800 Cc: Daniel Vetter , josh@joshtriplett.org, dri-devel@lists.freedesktop.org, Andy Lutomirski , Dave Airlie X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Mark functions cirrus_ttm_global_release(), cirrus_ttm_bo_is_cirrus_bo() and cirrus_ttm_tt_create() as static in drm/cirrus/cirrus_ttm.c because they are not used outside this file. Remove unused function cirrus_bo_unpin() from drm/cirrus/cirrus_ttm.c. This eliminates the following warnings in drm/cirrus/cirrus_ttm.c: drivers/gpu/drm/cirrus/cirrus_ttm.c:84:1: warning: no previous prototype for ‘cirrus_ttm_global_release’ [-Wmissing-prototypes] drivers/gpu/drm/cirrus/cirrus_ttm.c:105:6: warning: no previous prototype for ‘cirrus_ttm_bo_is_cirrus_bo’ [-Wmissing-prototypes] drivers/gpu/drm/cirrus/cirrus_ttm.c:211:16: warning: no previous prototype for ‘cirrus_ttm_tt_create’ [-Wmissing-prototypes] drivers/gpu/drm/cirrus/cirrus_ttm.c:378:5: warning: no previous prototype for ‘cirrus_bo_unpin’ [-Wmissing-prototypes] Signed-off-by: Rashika Kheria Reviewed-by: Josh Triplett --- drivers/gpu/drm/cirrus/cirrus_ttm.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus_ttm.c b/drivers/gpu/drm/cirrus/cirrus_ttm.c index 75becde..8b37c25 100644 --- a/drivers/gpu/drm/cirrus/cirrus_ttm.c +++ b/drivers/gpu/drm/cirrus/cirrus_ttm.c @@ -80,7 +80,7 @@ static int cirrus_ttm_global_init(struct cirrus_device *cirrus) return 0; } -void +static void cirrus_ttm_global_release(struct cirrus_device *cirrus) { if (cirrus->ttm.mem_global_ref.release == NULL) @@ -102,7 +102,7 @@ static void cirrus_bo_ttm_destroy(struct ttm_buffer_object *tbo) kfree(bo); } -bool cirrus_ttm_bo_is_cirrus_bo(struct ttm_buffer_object *bo) +static bool cirrus_ttm_bo_is_cirrus_bo(struct ttm_buffer_object *bo) { if (bo->destroy == &cirrus_bo_ttm_destroy) return true; @@ -208,7 +208,7 @@ static struct ttm_backend_func cirrus_tt_backend_func = { }; -struct ttm_tt *cirrus_ttm_tt_create(struct ttm_bo_device *bdev, +static struct ttm_tt *cirrus_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size, uint32_t page_flags, struct page *dummy_read_page) { @@ -375,26 +375,6 @@ int cirrus_bo_pin(struct cirrus_bo *bo, u32 pl_flag, u64 *gpu_addr) return 0; } -int cirrus_bo_unpin(struct cirrus_bo *bo) -{ - int i, ret; - if (!bo->pin_count) { - DRM_ERROR("unpin bad %p\n", bo); - return 0; - } - bo->pin_count--; - if (bo->pin_count) - return 0; - - for (i = 0; i < bo->placement.num_placement ; i++) - bo->placements[i] &= ~TTM_PL_FLAG_NO_EVICT; - ret = ttm_bo_validate(&bo->bo, &bo->placement, false, false); - if (ret) - return ret; - - return 0; -} - int cirrus_bo_push_sysram(struct cirrus_bo *bo) { int i, ret;