From patchwork Wed Sep 21 16:56:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9343937 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 AAC86607D4 for ; Wed, 21 Sep 2016 16:56:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC8832A79E for ; Wed, 21 Sep 2016 16:56:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A10832A807; Wed, 21 Sep 2016 16:56:21 +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.2 required=2.0 tests=BAYES_00, 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 401832A79E for ; Wed, 21 Sep 2016 16:56:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 733CE6E87C; Wed, 21 Sep 2016 16:56:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.web.de (mout.web.de [212.227.15.3]) by gabe.freedesktop.org (Postfix) with ESMTPS id A06166E87C for ; Wed, 21 Sep 2016 16:56:18 +0000 (UTC) Received: from [192.168.1.2] ([77.182.212.253]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0MTgum-1bMOGD2D9E-00QSs7; Wed, 21 Sep 2016 18:56:13 +0200 Subject: [PATCH 14/14] GPU-DRM-OMAP: Rename a jump label in four functions To: dri-devel@lists.freedesktop.org, David Airlie , Laurent Pinchart , Tomi Valkeinen References: <566ABCD9.1060404@users.sourceforge.net> <0ea38611-3d93-0ade-a1fb-f8cc2e0b8d61@users.sourceforge.net> From: SF Markus Elfring Message-ID: Date: Wed, 21 Sep 2016 18:56:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <0ea38611-3d93-0ade-a1fb-f8cc2e0b8d61@users.sourceforge.net> X-Provags-ID: V03:K0:iYFgKaYC8M3RkhZ/32IMBu0zU2WtWzNWvrIvwD+2HmlbxH8Cg11 P3BpAjSKFaum3M2WLf+fU9hH1Rnt19o4pkgzYMYO2SjsTa8p0ZlTZeg8DJJh2ZyqoPihxms q1hnWqYF9LoGFSXoQsJ0bqIJmniE3V5B9G6KRtmKY9g120ANvfei9vw8Jp/8j/dBjFGK6Tw mmU04o2B70JGPodEnGiAw== X-UI-Out-Filterresults: notjunk:1; V01:K0:1Bq+/NXEC2M=:6jm2G4zCORzAkHJLNJlOQG G8zoI7E82Ab/WLBZ0I3vwpnijsRrKQLhPBmMnWHrfzr0X+GoU/r+DSr64YyQTVjhnbGDjW5/N vAg0WRXnEMrYwnM+H9qAvGzEtkvKCRNwCYO46DwLhbCDTbxlXVNIisjVaiiAFViUZkmaNlZMt cY4V0ttH+iHHUmxxmLB03VvL5mbJdQDLHjOkBI0/AGnMRVj9TxHrXgG8HQvPF7Wng3iZuYPKD QGinExSHG8Ls2OvExCsXzhNObPnQq3+JFzPk5T9zXzHqIdS8ubK/J2K8ROXnoqRZqpOVGxqeL GOVr13UMUNrSbZTQGXKbzmyCeMyKDVp5OtMg/+KcLeilZ2kXU9tvJWjLy7zykOydwcpLxzux6 i11lJRON26yrR5Sumo093y1bu2sEOUycSkNFouxKEhOkH+pw95OBr0flvH1He2sHambdy/UI4 2m4Qgaftz3kUIXpMZWA31DqfUXLADoWcQXWpSNjX/b2IzR+Tvq9lXfYfyo6L7IpPsbEkahcrP lNz6AwrKJ4pwKefB4rBial0x7T1h5lgV2PbtxaSpFnOjKDTLaDgysIxoAY4wlOZVOdyDT9pfD uhNk6wDCLI3rRqRRHcb6ynPStrRw1oHKk1/58breFepBJBc1bHsnODpwZpqN+WLupPUQjIImA AXOUJGzKTjSzngzofI6GBFPY7CrJKXMJkewC6tCLgi5SMUXd3qblio14uRzqPddOEygEsxRJd 3tBVc83/rlG7DfR2TeluYxd2pWlY5qwxfrw5FpZIj0yC6f/Z1Q4tdnMHAsYuvKOBhGUp2FbV6 0cTXRpj Cc: Julia Lawall , kernel-janitors@vger.kernel.org, LKML X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring Date: Wed, 21 Sep 2016 18:00:23 +0200 Adjust jump labels according to the current Linux coding style convention. Thus replace the identifier "fail" by "unlock" for this refactoring. Signed-off-by: Markus Elfring --- drivers/gpu/drm/omapdrm/omap_gem.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c index 92510de..ea7ad1c 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -549,7 +549,7 @@ int omap_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) /* if a shmem backed object, make sure we have pages attached now */ ret = get_pages(obj, &pages); if (ret) - goto fail; + goto unlock; /* where should we do corresponding put_pages().. we are mapping * the original page, rather than thru a GART, so we can't rely @@ -561,9 +561,7 @@ int omap_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ret = fault_2d(obj, vma, vmf); else ret = fault_1d(obj, vma, vmf); - - -fail: + unlock: mutex_unlock(&dev->struct_mutex); switch (ret) { case 0: @@ -682,14 +680,13 @@ int omap_gem_dumb_map_offset(struct drm_file *file, struct drm_device *dev, obj = drm_gem_object_lookup(file, handle); if (obj == NULL) { ret = -ENOENT; - goto fail; + goto unlock; } *offset = omap_gem_mmap_offset(obj); drm_gem_object_unreference_unlocked(obj); - -fail: + unlock: return ret; } @@ -719,13 +716,12 @@ int omap_gem_roll(struct drm_gem_object *obj, uint32_t roll) struct page **pages; ret = get_pages(obj, &pages); if (ret) - goto fail; + goto unlock; ret = tiler_pin(omap_obj->block, pages, npages, roll, true); if (ret) dev_err(obj->dev->dev, "could not repin: %d\n", ret); } - -fail: + unlock: mutex_unlock(&obj->dev->struct_mutex); return ret; @@ -825,7 +821,7 @@ int omap_gem_get_paddr(struct drm_gem_object *obj, ret = get_pages(obj, &pages); if (ret) - goto fail; + goto unlock; if (omap_obj->flags & OMAP_BO_TILED) { block = tiler_reserve_2d(fmt, @@ -839,7 +835,7 @@ int omap_gem_get_paddr(struct drm_gem_object *obj, ret = PTR_ERR(block); dev_err(obj->dev->dev, "could not remap: %d (%d)\n", ret, fmt); - goto fail; + goto unlock; } /* TODO: enable async refill.. */ @@ -849,7 +845,7 @@ int omap_gem_get_paddr(struct drm_gem_object *obj, tiler_release(block); dev_err(obj->dev->dev, "could not pin: %d\n", ret); - goto fail; + goto unlock; } omap_obj->paddr = tiler_ssptr(block); @@ -865,10 +861,9 @@ int omap_gem_get_paddr(struct drm_gem_object *obj, *paddr = omap_obj->paddr; } else { ret = -EINVAL; - goto fail; + goto unlock; } - -fail: + unlock: mutex_unlock(&obj->dev->struct_mutex); return ret;