From patchwork Wed Nov 23 10:49:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tvrtko Ursulin X-Patchwork-Id: 9442921 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 32244600BA for ; Wed, 23 Nov 2016 10:49:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4330B206AF for ; Wed, 23 Nov 2016 10:49:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 36812208E3; Wed, 23 Nov 2016 10:49:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C76DF206AF for ; Wed, 23 Nov 2016 10:49:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BBD476E7E3; Wed, 23 Nov 2016 10:49:25 +0000 (UTC) X-Original-To: Intel-gfx@lists.freedesktop.org Delivered-To: Intel-gfx@lists.freedesktop.org Received: from mail-wj0-x242.google.com (mail-wj0-x242.google.com [IPv6:2a00:1450:400c:c01::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id BFF076E7E3 for ; Wed, 23 Nov 2016 10:49:24 +0000 (UTC) Received: by mail-wj0-x242.google.com with SMTP id f8so743432wje.2 for ; Wed, 23 Nov 2016 02:49:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ursulin-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fb4a8Qko4ktKq80F2bT5JKJPeNfrXvuzGg25RYm/Mh8=; b=BVUmvtQdAGjiBHoMSmiohn1PPEpxX3Q7cThFyXfuP3GRrUUBO27+KIfjs1cSgKUHvR XUDifj32vlPdB21DOl3SXmnUbSvxpN1yt9+y7Qf1DiGiyBZNBbpv5FhbDk4K835aLgSH wXpQG3avRo9tZMylv4vLnLFbjQGDYAqkR3c2/FBVbp7/iuMrTeI9qYEvdc4YyiDCvWBN mb3sF/1Dwle9mUAMFByBkpST2/Gb4c27+97OBXNhbHopul/oeZDHqIa0qkl/g/4Ex9Hk OlPmkOSiMhRtZONJAeQN9gfmyf7S5eWucCMR7KNeWjw9hyRc3AKBv6qvjLWe+fsfoYs5 breA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fb4a8Qko4ktKq80F2bT5JKJPeNfrXvuzGg25RYm/Mh8=; b=TOGKt7ZflcBKumG+wXOLEJpeEFFEnBn66EFxw77dRIbEt9y8mR2BFj2y3si0vgvG0J gDuTrkQlYkXYx63VgefyFgMJWBoY9HXVrixOhSrHlnYqY0Z13b0s4AdDyPiwtIGjrEBv wxDMRYyPj35D2sSJ7JETNO+vbZPD+kn0e3BFpzAsctgkzgdgTo/0pMDx1J5KY1mWE4Pg A+LJW9jnpS/M9mFLJLEhV0ozoT00kiMMA+Ra4tTOSzThn4eWOWRvXbaFmfuSHRt6k5Uc hIDNR/e8yezxCWzgeQg557iXAG9v6FY1+QRIrqy2K6phHZtZ288sMvAHwTOB31J8+/65 lwXQ== X-Gm-Message-State: AKaTC01DXZd3U/Vdlhyg3A6Nk75WWN3GEaRyK8BugfqRpDzrMDfkL4FC5IvewiOMXAS3Gg== X-Received: by 10.194.145.70 with SMTP id ss6mr2956664wjb.158.1479898163193; Wed, 23 Nov 2016 02:49:23 -0800 (PST) Received: from t460p.intel ([2a02:c7d:9bd6:b000:f37e:1e07:a7d8:46cd]) by smtp.gmail.com with ESMTPSA id d85sm2078728wmd.17.2016.11.23.02.49.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Nov 2016 02:49:22 -0800 (PST) From: Tvrtko Ursulin X-Google-Original-From: Tvrtko Ursulin To: Intel-gfx@lists.freedesktop.org Date: Wed, 23 Nov 2016 10:49:15 +0000 Message-Id: <1479898155-21014-1-git-send-email-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20161123103417.GC19956@nuc-i3427.alporthouse.com> References: <20161123103417.GC19956@nuc-i3427.alporthouse.com> Subject: [Intel-gfx] [PATCH v2] drm/i915: i915_gem_alloc_context_obj can be static X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Tvrtko Ursulin It has only one call site from the same file. v2: Also rename it to alloc_context_obj. (Chris Wilson) Signed-off-by: Tvrtko Ursulin Reviewed-by: Chris Wilson Cc: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h | 2 -- drivers/gpu/drm/i915/i915_gem_context.c | 7 +++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 970e50bf9884..c44f2410f10f 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -3342,8 +3342,6 @@ struct i915_vma * i915_gem_context_pin_legacy(struct i915_gem_context *ctx, unsigned int flags); void i915_gem_context_free(struct kref *ctx_ref); -struct drm_i915_gem_object * -i915_gem_alloc_context_obj(struct drm_device *dev, size_t size); struct i915_gem_context * i915_gem_context_create_gvt(struct drm_device *dev); diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index f82936a2fcce..a6add0c14045 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -166,8 +166,8 @@ void i915_gem_context_free(struct kref *ctx_ref) kfree(ctx); } -struct drm_i915_gem_object * -i915_gem_alloc_context_obj(struct drm_device *dev, size_t size) +static struct drm_i915_gem_object * +alloc_context_obj(struct drm_device *dev, u64 size) { struct drm_i915_gem_object *obj; int ret; @@ -286,8 +286,7 @@ __create_hw_context(struct drm_device *dev, struct drm_i915_gem_object *obj; struct i915_vma *vma; - obj = i915_gem_alloc_context_obj(dev, - dev_priv->hw_context_size); + obj = alloc_context_obj(dev, dev_priv->hw_context_size); if (IS_ERR(obj)) { ret = PTR_ERR(obj); goto err_out;