From patchwork Thu Apr 12 05:54:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 10337895 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 9678960329 for ; Thu, 12 Apr 2018 05:54:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86A40285B5 for ; Thu, 12 Apr 2018 05:54:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B288285D1; Thu, 12 Apr 2018 05:54:19 +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=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 1A732285B5 for ; Thu, 12 Apr 2018 05:54:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2951D6E3D1; Thu, 12 Apr 2018 05:54:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by gabe.freedesktop.org (Postfix) with ESMTPS id 930F86E3D1 for ; Thu, 12 Apr 2018 05:54:14 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.48,440,1517871600"; d="scan'208";a="261749777" Received: from ip-146.net-89-2-7.rev.numericable.fr (HELO [192.168.0.15]) ([89.2.7.146]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Apr 2018 07:54:11 +0200 Date: Thu, 12 Apr 2018 07:54:10 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Joel Stanley Subject: [PATCH] drm: fix drm-get-put.cocci warnings Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aspeed@lists.ozlabs.org, David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Andrew Jeffery , kbuild-all@01.org, linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Fengguang Wu Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and drm_*_unreference() helpers. Generated by: scripts/coccinelle/api/drm-get-put.cocci Fixes: 6784ac15bc68 ("drm: Add ASPEED GFX driver") Signed-off-by: Fengguang Wu Signed-off-by: Julia Lawall --- tree: https://github.com/shenki/linux drm-v1 head: 9680ed7979d5d403c6bde36271a048d62c048180 commit: 6784ac15bc6889280522b04b97f1fb1208ee45e7 [23/27] drm: Add ASPEED GFX driver aspeed_gfx_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c @@ -268,7 +268,7 @@ static int aspeed_gfx_probe(struct platf err_unload: aspeed_gfx_unload(drm); err_free: - drm_dev_unref(drm); + drm_dev_put(drm); return ret; } @@ -279,7 +279,7 @@ static int aspeed_gfx_remove(struct plat drm_dev_unregister(drm); aspeed_gfx_unload(drm); - drm_dev_unref(drm); + drm_dev_put(drm); return 0; }