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: 898501 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40PgTF6PK7z9s0b for ; Mon, 16 Apr 2018 17:47:29 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=lip6.fr Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 40PgTF50R5zF1Rt for ; Mon, 16 Apr 2018 17:47:29 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=lip6.fr X-Original-To: linux-aspeed@lists.ozlabs.org Delivered-To: linux-aspeed@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=neutral (mailfrom) smtp.mailfrom=lip6.fr (client-ip=192.134.164.104; helo=mail3-relais-sop.national.inria.fr; envelope-from=julia.lawall@lip6.fr; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=lip6.fr X-Greylist: delayed 312 seconds by postgrey-1.36 at bilbo; Thu, 12 Apr 2018 15:57:42 AEST Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 40M9DQ045yzDqyG for ; Thu, 12 Apr 2018 15:57:41 +1000 (AEST) 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-Mailman-Approved-At: Mon, 16 Apr 2018 17:47:26 +1000 X-BeenThere: linux-aspeed@lists.ozlabs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Linux ASPEED SoC 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, kbuild-all@01.org, linux-arm-kernel@lists.infradead.org Errors-To: linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Linux-aspeed" 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; }