lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ponylw8j.fsf@intel.com>
Date:   Tue, 20 Sep 2016 13:08:12 +0300
From:   Jani Nikula <jani.nikula@...ux.intel.com>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>,
        dri-devel@...ts.freedesktop.org, Daniel Vetter <daniel@...ll.ch>,
        David Airlie <airlied@...ux.ie>,
        Patrik Jakobsson <patrik.r.jakobsson@...il.com>
Cc:     Julia Lawall <julia.lawall@...6.fr>,
        kernel-janitors@...r.kernel.org,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 6/6] GPU-DRM-GMA500: Rename a jump label in mid_get_vbt_data()

On Tue, 20 Sep 2016, SF Markus Elfring <elfring@...rs.sourceforge.net> wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Tue, 20 Sep 2016 10:40:22 +0200
>
> * Adjust a jump target.

Please don't.

BR,
Jani.

>
> * Delete the explicit initialisation for the local variable "ret"
>   which became unnecessary with this refactoring.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
>  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;

-- 
Jani Nikula, Intel Open Source Technology Center

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ