From patchwork Sat Oct 14 18:36:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: harsha sharma X-Patchwork-Id: 10006529 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 3191E601E9 for ; Sat, 14 Oct 2017 18:39:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CF35287FB for ; Sat, 14 Oct 2017 18:39:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10EB92909E; Sat, 14 Oct 2017 18:39:04 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 F2B06287FB for ; Sat, 14 Oct 2017 18:39:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 556A76E0AF; Sat, 14 Oct 2017 18:39:00 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pf0-x244.google.com (mail-pf0-x244.google.com [IPv6:2607:f8b0:400e:c00::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id B3E606E0AF; Sat, 14 Oct 2017 18:38:59 +0000 (UTC) Received: by mail-pf0-x244.google.com with SMTP id e64so12796052pfk.9; Sat, 14 Oct 2017 11:38:59 -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; bh=ovSAkSBCe7LIfsL+haxWKviEWqujq5GYZO5j1bv3/iU=; b=c3xqqihoHBaJIDg2I2Qtz05XT7qdUcegbJGR19fiZkqiFjW/Pn6vzwNk1OkyRJgjbh dU2xnE9IVagEqP0yR24V9BqmjGct0h2PJAnUI/vreK46dbW7056TvQjJ44eX7nle/ie3 XR08vyBkNQ1kLj5LAjbZfQr8MBzm+XqgS976KanKyq1pl5L6ebjE1iZRDh8zAAZChGK9 NDdVwWDZv5EJgH/uyFuPMyPf3ATJp9A7Fc/RIbdG++LI9DM+uDxTu3aZVB1TLCImeY4X OBkc86/uAXb5FaRtz1ZR7JzsEwbFAAqhOVqaYQWEh60Ovfrvj+SGHWiuFgeti9mxL18e xAVA== 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; bh=ovSAkSBCe7LIfsL+haxWKviEWqujq5GYZO5j1bv3/iU=; b=IpTm+U8dgkYGgrR6OJNu+Mv1mX+FJsi23BxoT4nLfIaRb/nnlnufN3SiY0vpXqS7k8 Wunqde0v23fAoZ2nRnqPjEkGgl4zVOkelTnxlzgC/aP8NnNcqUe5f9MkCGtzQQggxDYc QLfol5iIbMjjhtP5B48e45GYWlhuPQvvYJ1vijnCmLrcUcnl6iGiIISBXBh1CWk2xen8 WPsA3H3xm9AUM0ZmlkVw3ZCwg81wUBPldvu+7jz1nQHMFgIg8EN440THVgZiozbw+C2B RFMb8WvmRB8gZCtIyqqqez1vBrN5iF7UhXWJkjqRpVOKMTcErjpJiNi6tQU3EkMkGrUV X2tg== X-Gm-Message-State: AMCzsaVzBHneSzOAguw9EKM6KurE1JQF379uD6kxZEJAN4tetH/bAvQz NlTykNfQj6Nu12KqODn/6fI= X-Google-Smtp-Source: AOwi7QBoe723INOMj6RSBTMjTN+O4qLaVxbWhJ/d9Il8SmmkWJMfNR/OPvOCUbl/nADQk6Ey6Z20Qw== X-Received: by 10.84.129.193 with SMTP id b59mr4709692plb.317.1508006339257; Sat, 14 Oct 2017 11:38:59 -0700 (PDT) Received: from localhost.localdomain ([103.37.201.27]) by smtp.gmail.com with ESMTPSA id y127sm7001037pgb.60.2017.10.14.11.38.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Oct 2017 11:38:58 -0700 (PDT) From: Harsha Sharma To: daniel.vetter@ffwll.ch, seanpaul@chromium.org, jani.nikula@linux.intel.com Date: Sun, 15 Oct 2017 00:06:44 +0530 Message-Id: <20171014183644.21990-1-harshasharmaiitr@gmail.com> X-Mailer: git-send-email 2.11.0 Cc: outreachy-kernel@googlegroups.com, intel-gfx@lists.freedesktop.org, Harsha Sharma , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH v5] drm/i915: Replace *_reference/unreference() or *_ref/unref with _get/put() 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 Replace instances of drm_framebuffer_reference/unreference() with *_get/put() suffixes and drm_dev_unref with *_put() suffix because get/put is shorter and consistent with the kernel use of *_get/put suffixes. Done with following coccinelle semantic patch @@ expression ex; @@ ( -drm_framebuffer_unreference(ex); +drm_framebuffer_put(ex); | -drm_dev_unref(ex); +drm_dev_put(ex); | -drm_framebuffer_reference(ex); +drm_framebuffer_get(ex); ) Signed-off-by: Harsha Sharma --- Changes in v5: -rebase drm_dev_put change on drm-tip Changes in v4: -change one instance of *_put to *_get Changes in v3: -Removed changes in selftests Changes in v2: -Added cocinelle patch in log message -cc to all driver-specific mailing lists drivers/gpu/drm/i915/i915_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index bf467f30c99b..1223961c3700 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c @@ -645,7 +645,7 @@ static void i915_pci_remove(struct pci_dev *pdev) struct drm_device *dev = pci_get_drvdata(pdev); i915_driver_unload(dev); - drm_dev_unref(dev); + drm_dev_put(dev); } static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)