From patchwork Thu Sep 22 17:35:47 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: 9345931 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 F25BE6077A for ; Thu, 22 Sep 2016 17:35:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E90B52ABFC for ; Thu, 22 Sep 2016 17:35:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCAE62ABFE; Thu, 22 Sep 2016 17:35:53 +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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM 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 83C5D2ABFC for ; Thu, 22 Sep 2016 17:35:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E389D6E3B5; Thu, 22 Sep 2016 17:35:52 +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.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id 666E16E3B5 for ; Thu, 22 Sep 2016 17:35:51 +0000 (UTC) Received: from [192.168.1.2] ([77.182.99.72]) by smtp.web.de (mrweb004) with ESMTPSA (Nemesis) id 0LiFT1-1bAVYl0AMt-00nQcL; Thu, 22 Sep 2016 19:35:48 +0200 Subject: [PATCH 03/14] GPU-DRM-TTM: Rename jump labels in ttm_page_pool_free() To: dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie , Emil Velikov References: <566ABCD9.1060404@users.sourceforge.net> <4d34446f-05ad-c3ce-5d33-8fb4f25af25c@users.sourceforge.net> From: SF Markus Elfring Message-ID: Date: Thu, 22 Sep 2016 19:35:47 +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: <4d34446f-05ad-c3ce-5d33-8fb4f25af25c@users.sourceforge.net> X-Provags-ID: V03:K0:RghPzGcCvkqZDnSLHnDl1WrUT2pRaYh/x2q4+WidgFi4vcy4zvP TmuAB6jCka91MkOLW46sbkKBSQrNhbifB0vmVqn+q530vbtYEGAdZWhxEmD/DRkx6E3JhIt rM942QvY3MpjVSb2dKkvkjYG00KsZAH9CMvZxbUNgmg8PyuYvj72zhRdKug/zuJX/D9iSLD yy5G16pVCspKxH5XigjZg== X-UI-Out-Filterresults: notjunk:1; V01:K0:mFervd9yl1o=:mfiklqxyGifwOQPipMqeO2 1GFm8sxuvgUNKykRlEzDkcIvQTaEyEHBG1RtGPurHopP6ws8+4dk29CsDw5c7jZabmZupKD/B PkBF87vtqLfB890siAvUbJL/QFHRkvMbPOJR/etJjJ+gv9+vhnRDKcu7EJx61Qq8OnFe0/A5f /p97yCa2mW573ycbmDJ63lTm3/0T6K1nUVSSQr0f9z0Npi5ANnM5O7L6JrDewy4Vn1ZeSJP1k 4zVt3XQhKQ/l2Hjifda2fObmwoK+2XdZz05eywMxEhBK5mpOGS0w0MvYh8ifq+XOjTJ8UbuQK /wNOJu7+EjXnkBq8DEcjWaBRk5a/UhhFRHfYmMkmvnFu+SG3f9xdbASoaeni9ME9pYvF6B2fH PQwsIXwTp4fOn7sLhdtk1iQxBanD24Uotgc3VfGhKSeFPAi151Zk8oxt/kdS7g6n6yz+tHbGm jPtB2jd61uHw/z+5xGzz4tk2PfTp67r9cUt7kSTmCCRxHZdhfOb15wd6l4VCfEMuAHXIrVSsn ojWbvzB9nRViHxJZF+rflCuBb1g2wHjX0Zy0ikMNu2aFGtZ7RF/RfSZGp7EPs2MfX5ENZ5jBv +Qp7un2ae+UJo5cPFd6bJLMGaEovUknOtZV2F41gjr7uIRNBU7vFmYUd10W/hwrq5eq2StVce 7D42+ONSTXtXhWAENfVG+FUdfJPivgX65IWYwfqKZPEQOo16svguAQPmj+XFKIJd81VDTH/fa QP+8SAIdqiq3ScldCq5zBTM2bMMoB2UkDlhS3WuRtAHt6kFHOhfpQf+wm3Ktqo+QDmNz/BSHh ZqknTxe 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: Thu, 22 Sep 2016 14:30:12 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 13fdd19..f33f6f6 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -322,8 +322,7 @@ static int ttm_page_pool_free(struct ttm_page_pool *pool, unsigned nr_free, pr_err("Failed to allocate memory for pool free operation\n"); return 0; } - -restart: + lock_restart: spin_lock_irqsave(&pool->lock, irq_flags); list_for_each_entry_reverse(p, &pool->list, lru) { @@ -356,14 +355,13 @@ restart: /* free all so restart the processing */ if (nr_free) - goto restart; + goto lock_restart; /* Not allowed to fall through or break because * following context is inside spinlock while we are * outside here. */ - goto out; - + goto check_pages_to_free; } } @@ -379,7 +377,7 @@ restart: if (freed_pages) ttm_pages_put(pages_to_free, freed_pages); -out: + check_pages_to_free: if (pages_to_free != static_buf) kfree(pages_to_free); return nr_free;