From patchwork Tue Sep 20 09:01:50 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: 9341371 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 0961360B16 for ; Tue, 20 Sep 2016 09:02:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E624F29D5F for ; Tue, 20 Sep 2016 09:02:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DAF0A29D82; Tue, 20 Sep 2016 09:02:03 +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 E014829D5F for ; Tue, 20 Sep 2016 09:01:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 404686E089; Tue, 20 Sep 2016 09:01:57 +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.17.12]) by gabe.freedesktop.org (Postfix) with ESMTPS id DED5F6E089 for ; Tue, 20 Sep 2016 09:01:54 +0000 (UTC) Received: from [192.168.1.2] ([77.182.226.232]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0MI6C2-1bq7DU35Kw-003v5O; Tue, 20 Sep 2016 11:01:50 +0200 Subject: [PATCH 6/6] GPU-DRM-GMA500: Rename a jump label in mid_get_vbt_data() To: dri-devel@lists.freedesktop.org, Daniel Vetter , David Airlie , Patrik Jakobsson References: <566ABCD9.1060404@users.sourceforge.net> <3c9785ef-4553-2e3d-2cb2-5cf6d1f31ccd@users.sourceforge.net> From: SF Markus Elfring Message-ID: <64e06a00-42d1-e7a8-1fe7-1b5de026b060@users.sourceforge.net> Date: Tue, 20 Sep 2016 11:01:50 +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: <3c9785ef-4553-2e3d-2cb2-5cf6d1f31ccd@users.sourceforge.net> X-Provags-ID: V03:K0:ksAih8+SMFITM6dtKY8v46YMC2inCaH88F344HVcZJOKQ6LITPe uyKiHHSzE13HfTBmZ3+5pUNxhbOKTAYXFuT4ZW0o8RVE49Dta5qyNk9MkxpZkPtCLViIfLT mH8+E+kdLz+cA5ozIaCqIwP9AqF42KTY6ih8Bh3Yls3QIyuAMP0eGr+Sqbnxbe3aIJKamWw jW/ZUrQTbrvZAHy3fut6w== X-UI-Out-Filterresults: notjunk:1; V01:K0:M1VRooicLoY=:pnZ8f2aSdvF1+goye+3+Z5 ek9HQQ7UzynKxUMd2W6DqcOErn9r5sQY+Mbnrz1yhpi/4S8R8lX2KwZ8xKtziNdhntPHniNx0 jAkpncdxjbAEuPXTVB5WdyIZxKVBPGA5rFZWF5P6HixDnegeMMqmgwhNCN69uw76NNl4niHmN KxiVsf+hsWSSi1K4og/20IkGA/pJ5nvbEmz2P5yYuDMNb9gzfSH+aQzb3Hb9BiPzs2iHkvtpD EgUn1wOVgPCEQ4mjBUhXu/5QLTXpYZ/MVVA+uGjQJhUy5tw24lY6OTEA4xHCstCit6dy0r2w1 K6I5tz0RImu32IpvN7l7zTJ2+ZWOJwk6RDmFnv4xObS0n7XQRrnOethrdQ1h+JavFZ7tc6CVS rdTWBQo8xntvmj/Hg4rPhMOeD7sfoJXucIvKS8q56VjMWUmdihqBrUOzVJLjhxMFXhb3qPzbW sWBFqkUBHZCCHa4ZiHoenyD69e7KDkwzpRMEM/Nar6lczYe8iRi/+64kpoDqRCqFoYfE6435q ukhlPl+oL0pWOwdPQFXhQ/hlyzLrP3SqRGLxwTGxt/MymmxUWOiJif5NuV4YOdRk8pWltvcrC pugijfdoci6sDRewklo39SkEHNs9Qfi6cEVqHlA5XEwE4bH4jxfGQNtGlEoH/crwkgMsZ+1Kn jQGe+5iaaP6fJzcosCYZGC4Ci4WB38w95nZ8twnKqF5/IjqcwDMLEiRISEdWCZfwso8ICYajR la24LeDZW6OzEAw7SLfu25JUTMNJBqUirbfXV/ZEoiYj3o34XGYlVWHK68yrzD9rAfTNXyXmg +VLu0dj 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: Tue, 20 Sep 2016 10:40:22 +0200 * Adjust a jump target. * Delete the explicit initialisation for the local variable "ret" which became unnecessary with this refactoring. Signed-off-by: Markus Elfring --- drivers/gpu/drm/gma500/mid_bios.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/gma500/mid_bios.c b/drivers/gpu/drm/gma500/mid_bios.c index e5cece0..602d16f 100644 --- a/drivers/gpu/drm/gma500/mid_bios.c +++ b/drivers/gpu/drm/gma500/mid_bios.c @@ -284,7 +284,7 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv) u8 __iomem *vbt_virtual; struct mid_vbt_header vbt_header; struct pci_dev *pci_gfx_root = pci_get_bus_and_slot(0, PCI_DEVFN(2, 0)); - int ret = -1; + int ret; /* Get the address of the platform config vbt */ pci_read_config_dword(pci_gfx_root, 0xFC, &addr); @@ -293,18 +293,18 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv) dev_dbg(dev->dev, "drm platform config address is %x\n", addr); if (!addr) - goto out; + goto report_failure; /* get the virtual address of the vbt */ vbt_virtual = ioremap(addr, sizeof(vbt_header)); if (!vbt_virtual) - goto out; + goto report_failure; memcpy_fromio(&vbt_header, vbt_virtual, sizeof(vbt_header)); iounmap(vbt_virtual); if (memcmp(&vbt_header.signature, "$GCT", 4)) - goto out; + goto report_failure; dev_dbg(dev->dev, "GCT revision is %02x\n", vbt_header.revision); @@ -322,9 +322,8 @@ static void mid_get_vbt_data(struct drm_psb_private *dev_priv) dev_err(dev->dev, "Unknown revision of GCT!\n"); return; } - -out: if (ret) + report_failure: dev_err(dev->dev, "Unable to read GCT!"); else dev_priv->has_gct = true;