From patchwork Thu Aug 10 12:09:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cihangir Akturk X-Patchwork-Id: 9893425 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 AA1AA60236 for ; Thu, 10 Aug 2017 12:12:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B64728AF0 for ; Thu, 10 Aug 2017 12:12:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9003428AF2; Thu, 10 Aug 2017 12:12:33 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3799928AF0 for ; Thu, 10 Aug 2017 12:12:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=6gDSle1Fm58AA0KeBrtpYzr1j6cCqQGiXPPDDf9TpG4=; b=UfXetH/BDw5/aBnNIbtuoq7UdU KNkukC0FiY49S6At8/0phvV13QziihK6gIS5vhHw2VQFi9Ie/m3oacALUY5sil4KVfIRDpj/u/KbZ 0MhZ2q9n6rr4sD1UtE/+vCQM8yH4HmGBPNuYwzlhBI3HyrhpdC/9yOBCFIx2GlYQ8l5D3jel1zaxa qumo5GfkT43fGKWbWnZCNV1w9+ilccUAfK4GYhXDLXDcaUoxNSLsiIH0PWyd19KPna3iXM13o1pXs t5Y+pxwmV+m/96udKye8MXxRVbOm9LH8DaFdzeon1QKck6UiOeyuaaXzXoAwSwbpaaF9GIbKUHiYZ 6pYDDK3A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dfmKF-0008Cc-CU; Thu, 10 Aug 2017 12:12:31 +0000 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dfmJg-0007bx-Ep; Thu, 10 Aug 2017 12:12:05 +0000 Received: by mail-wm0-x242.google.com with SMTP id x64so2813360wmg.1; Thu, 10 Aug 2017 05:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=QOa/Lfbmk5grz1q2tmiu5a2bMZHmCg0Ej0gbWHLTohU=; b=Ly+DSZcI88lnzvLb0A39nRFLoNnqV6RrOj8oQUH2hu9Mp1wkVTVUM9KU5Bz044gqpJ AbB8UcDfF8K9+/bRT0ESauggaQnWFe3IovJn0iNfkoOHeA4xmQmmcbI06onitSJGwdrt 1+KXv4QPR7rNVzFz8v9Q6cczxVDakvSOJnb2DHRfNaFVAoUqexqRLcKLnHxfkeHIqWCI mdNchhDZdLuRcyT/VtYs6/xwNxpXEw4lj8/Cfh2ftIs0mUZt2Yz9s+o03jynIUerJC9r TKrLvL38aCPLwI5xHWXcSmFbQcuKj2vLSMjFTD0RBP+rFh2TAMyN+7MYQDPedNEK4EOF YNGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=QOa/Lfbmk5grz1q2tmiu5a2bMZHmCg0Ej0gbWHLTohU=; b=N6eIUotjN+29jGLfoguFQS28izeY7LkkaHm+vpJF2DHmuT0JsUCGnl2f58J8KMEs+X tUJFHtnj+vfA+7S8wnU08p/XxlCunMGqec+Abem6YM5dn6IWUrGze2W9StsuC/4iT4lR 7YeO5qiYbtMCatGIaDuFzoBXCyL31H+/GWtGYTjcishaOZho3vbDQvxa+7UuHIBWJGRj 62p6cyabNcKtG1e5OOaTsOM54qFofwsQqlKc6m6miEzRxGJR8rS/f3HaXM/mnNz5M4YC FVwdnBY56HVmVmCH6onAvZClMKo9zxCrufPAa9W1XwOudu3lx4aPds785j722AsCu45l UnJQ== X-Gm-Message-State: AHYfb5iGXF377TI6VZLtJyKwpDyjPgw9TcZwbwOll9PNI4g6Oj/puK29 DUpv7jbNwyym+Q== X-Received: by 10.28.103.138 with SMTP id b132mr8501073wmc.35.1502367099721; Thu, 10 Aug 2017 05:11:39 -0700 (PDT) Received: from localhost.localdomain ([161.9.194.184]) by smtp.gmail.com with ESMTPSA id 2sm4260201wrp.63.2017.08.10.05.11.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Aug 2017 05:11:39 -0700 (PDT) From: Cihangir Akturk To: Subject: [PATCH v2 14/29] drm/mediatek: switch to drm_*_get(), drm_*_put() helpers Date: Thu, 10 Aug 2017 15:09:57 +0300 Message-Id: <1502367012-9417-15-git-send-email-cakturk@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502367012-9417-1-git-send-email-cakturk@gmail.com> References: <1502367012-9417-1-git-send-email-cakturk@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170810_051157_458840_F9F7D68C X-CRM114-Status: GOOD ( 10.91 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: daniel@ffwll.ch, David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Cihangir Akturk , Matthias Brugger , Philipp Zabel , CK Hu , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and drm_*_unreference() helpers. drm_*_reference() and drm_*_unreference() functions are just compatibility alias for drm_*_get() and drm_*_put() and should not be used by new code. So convert all users of compatibility functions to use the new APIs. Generated by: scripts/coccinelle/api/drm-get-put.cocci Signed-off-by: Cihangir Akturk --- drivers/gpu/drm/mediatek/mtk_drm_fb.c | 4 ++-- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_fb.c b/drivers/gpu/drm/mediatek/mtk_drm_fb.c index d4246c9..0d8d506 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_fb.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_fb.c @@ -58,7 +58,7 @@ static void mtk_drm_fb_destroy(struct drm_framebuffer *fb) drm_framebuffer_cleanup(fb); - drm_gem_object_unreference_unlocked(mtk_fb->gem_obj); + drm_gem_object_put_unlocked(mtk_fb->gem_obj); kfree(mtk_fb); } @@ -160,6 +160,6 @@ struct drm_framebuffer *mtk_drm_mode_fb_create(struct drm_device *dev, return &mtk_fb->base; unreference: - drm_gem_object_unreference_unlocked(gem); + drm_gem_object_put_unlocked(gem); return ERR_PTR(ret); } diff --git a/drivers/gpu/drm/mediatek/mtk_drm_gem.c b/drivers/gpu/drm/mediatek/mtk_drm_gem.c index 7abc550..961cbf5 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_gem.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_gem.c @@ -122,7 +122,7 @@ int mtk_drm_gem_dumb_create(struct drm_file *file_priv, struct drm_device *dev, goto err_handle_create; /* drop reference from allocate - handle holds it now. */ - drm_gem_object_unreference_unlocked(&mtk_gem->base); + drm_gem_object_put_unlocked(&mtk_gem->base); return 0; @@ -152,7 +152,7 @@ int mtk_drm_gem_dumb_map_offset(struct drm_file *file_priv, DRM_DEBUG_KMS("offset = 0x%llx\n", *offset); out: - drm_gem_object_unreference_unlocked(obj); + drm_gem_object_put_unlocked(obj); return ret; }