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: 10337897 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 3F77560329 for ; Thu, 12 Apr 2018 05:54:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E0CE285B5 for ; Thu, 12 Apr 2018 05:54:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21F25285D1; Thu, 12 Apr 2018 05:54:45 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 90884285B5 for ; Thu, 12 Apr 2018 05:54:44 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=MzfWa47udC9ZpFbFUxcFIYIY1xhrhFbuJfRkMSBhEYA=; b=d3Lo7gVOG4VoU0 1SyoW5S/HQsOCEmX1HDg6o779iDrs+vFJxu0I4PUEW5kFttv8dwZK1B9wAG+gEBv72oWCoYsuMNPn aZZxsoFbWQ+Dktcpk5/P3yuLhooPpp72SMQY6rN6lW4uZv7ThHiUCsMpmUDInMsP0vsHGpgwtAzdU md5jhQf0yZOKeL6nmcWdu5jSgpg+EvznZ8aIFVyI6oHHTrc+g6XM5C47ugUjTPtAs8AcoHyZq5Qji 4PBXhqC8Vg5gaDYYINYYGZmxiOKaKGbfpSY2pykC8+MIK0JUr31b17bsT0cNN9kyYUP98JMDsTeQl okzP7eFuFSV3YqUORxfA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6VBo-0007Dt-U3; Thu, 12 Apr 2018 05:54:32 +0000 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f6VBk-0007Br-Gb for linux-arm-kernel@lists.infradead.org; Thu, 12 Apr 2018 05:54:30 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180411_225428_845501_15E99949 X-CRM114-Status: UNSURE ( 9.58 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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; }