From patchwork Sun Mar 11 23:33:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haneen Mohammed X-Patchwork-Id: 10277911 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 58307602C2 for ; Tue, 13 Mar 2018 08:34:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5553F284C9 for ; Tue, 13 Mar 2018 08:34:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 485F628674; Tue, 13 Mar 2018 08:34:56 +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 E79D0284C9 for ; Tue, 13 Mar 2018 08:34:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A27546E444; Tue, 13 Mar 2018 08:34:22 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt0-x242.google.com (mail-qt0-x242.google.com [IPv6:2607:f8b0:400d:c0d::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id D671E6E0F3 for ; Sun, 11 Mar 2018 23:33:17 +0000 (UTC) Received: by mail-qt0-x242.google.com with SMTP id s48so2996982qtb.10 for ; Sun, 11 Mar 2018 16:33:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=8vcoXRMMACQJorcngg05+vXaEpqRDjofXjfpIFpiWU8=; b=pD2LC5txW+qBmjRLV3LexmnPR3S7NpIXcB6rPMyAlYPqBSlVSnaj7u0gDXc6Th10u+ EVlyQmfC+RufnmXAt5GbLriWF/PHwp/rhAYhnr65ClGjS/9wuMe3QCbahmjrerHXtOa8 YmRrm1gakc480zMS4783I1NbRC0FrW5K068G+GeTLPCLr2CJzPMFuxupj1LNwiRZ8rZt xds9cAO/aGcDX5Pti4HNJGYigfd7ZHn4ED+BweJ3pwgvYZksMy0bnM9aOxsFZ5LaCEwk QVaypMqXYhEATIN9e3C/2pQamGC2+CewCgWcItt5Nx1eGYYMMKENRSds7R7HKD3EV8gU VTuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=8vcoXRMMACQJorcngg05+vXaEpqRDjofXjfpIFpiWU8=; b=NE8avR0fwfWJFh3PDA+aLIGJZ7PW+e/kw/F6HtJE+jO4Vf8X1YFOakwci97xBWPhOT jj9gWtVBinNovWk+q3zzvbiK0esGMw0juug30ylHdgk6gxhCtjF5+Eny3D0jxQ8Pc/KH VjpCaU/WNtt2bSAadTlJee7P/JnuDKwN99s+hjrRoQryVvZNlNe8T/sWJQ+rFX1AACIP rX9104SRVxW6OdrqhI+Ax8gk+E9oox4FK+Mn9cksH35Km0fEEzHkvGVQ5MgqasNOX5jE yJ6soRVX7kvSwTN+Ypk2s3uhGrWuxTY+FDPvDDIdll0XZD2bqkaFRlGUThAIihVlgL+U P4hg== X-Gm-Message-State: AElRT7HzXN8HOmvF3rLsnQ8oZAF7RaVDxlruPQQYgPZG/fgvM7BLfigH uJZ+ukDz4e5K6GXacrN8osc= X-Google-Smtp-Source: AG47ELumOfc9ZOr31Pz/fHCnedQER4unWFjUIZKgbKp0opYojMnsC2Z5QHygaaufJoBmTJl8MvT3lA== X-Received: by 10.200.35.120 with SMTP id b53mr9231022qtb.262.1520811196821; Sun, 11 Mar 2018 16:33:16 -0700 (PDT) Received: from Haneen (c-73-238-34-189.hsd1.ma.comcast.net. [73.238.34.189]) by smtp.gmail.com with ESMTPSA id d36sm4431892qtk.47.2018.03.11.16.33.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Mar 2018 16:33:16 -0700 (PDT) Date: Sun, 11 Mar 2018 17:33:13 -0600 From: Haneen Mohammed To: outreachy-kernel@googlegroups.com Subject: [PATCH DRM] drm/vmwgfx: replace drm_*_unreference with drm_*_put Message-ID: <20180311233313.GA19721@Haneen> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-Mailman-Approved-At: Tue, 13 Mar 2018 08:33:43 +0000 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: Thomas Hellstrom , David Airlie , daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org, VMware Graphics Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch replace instances of drm_framebuffer_unreference with _put() suffix, because it is shorter and consistent with the kernel use of *_get/put() suffixes. This was done with the following Coccinelle script: @r@ expression e; @@ ( -drm_framebuffer_reference(e); +drm_framebuffer_get(e); | -drm_framebuffer_unreference(e); +drm_framebuffer_put(e); ) Signed-off-by: Haneen Mohammed --- drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c index d23a18a..be7d7fb 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c @@ -500,7 +500,7 @@ static int vmw_fb_kms_detach(struct vmw_fb_par *par, } if (cur_fb) { - drm_framebuffer_unreference(cur_fb); + drm_framebuffer_put(cur_fb); par->set_fb = NULL; } diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c index 67f8446..c5e8eae 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c @@ -316,7 +316,7 @@ int vmw_present_ioctl(struct drm_device *dev, void *data, out_no_surface: ttm_read_unlock(&dev_priv->reservation_sem); out_no_ttm_lock: - drm_framebuffer_unreference(fb); + drm_framebuffer_put(fb); out_no_fb: drm_modeset_unlock_all(dev); out_no_copy: @@ -393,7 +393,7 @@ int vmw_present_readback_ioctl(struct drm_device *dev, void *data, ttm_read_unlock(&dev_priv->reservation_sem); out_no_ttm_lock: - drm_framebuffer_unreference(fb); + drm_framebuffer_put(fb); out_no_fb: drm_modeset_unlock_all(dev); out_no_copy: