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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MWHPR12MB169448087FFFA2E8B5A61504F7F40@MWHPR12MB1694.namprd12.prod.outlook.com>
Date:   Mon, 19 Sep 2016 13:56:41 +0000
From:   "Deucher, Alexander" <Alexander.Deucher@....com>
To:     'SF Markus Elfring' <elfring@...rs.sourceforge.net>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "Koenig, Christian" <Christian.Koenig@....com>,
        "Zhou, David(ChunMing)" <David1.Zhou@....com>,
        David Airlie <airlied@...ux.ie>,
        "Liu, Monk" <Monk.Liu@....com>,
        "StDenis, Tom" <Tom.StDenis@....com>
CC:     LKML <linux-kernel@...r.kernel.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
        Julia Lawall <julia.lawall@...6.fr>
Subject: RE: [PATCH 4/5] drm/amdgpu: Rename a jump label in
 amdgpu_device_init()

> -----Original Message-----
> From: SF Markus Elfring [mailto:elfring@...rs.sourceforge.net]
> Sent: Sunday, September 18, 2016 12:53 PM
> To: dri-devel@...ts.freedesktop.org; Deucher, Alexander; Koenig, Christian;
> Zhou, David(ChunMing); David Airlie; Liu, Monk; StDenis, Tom
> Cc: LKML; kernel-janitors@...r.kernel.org; Julia Lawall
> Subject: [PATCH 4/5] drm/amdgpu: Rename a jump label in
> amdgpu_device_init()
> 
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Sun, 18 Sep 2016 17:50:09 +0200
> 
> Adjust jump labels according to the current Linux coding style convention.
> 
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 21 ++++++++++----------
> -
>  1 file changed, 10 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 2b8ba97..fed4854 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1566,18 +1566,18 @@ int amdgpu_device_init(struct amdgpu_device
> *adev,
>  	/* Read BIOS */
>  	if (!amdgpu_get_bios(adev)) {
>  		r = -EINVAL;
> -		goto failed;
> +		goto check_runtime;

NACK.  Failed is a more appropriate label here.  The runtime check is just part of the failure cleanup.

Alex

>  	}
>  	/* Must be an ATOMBIOS */
>  	if (!adev->is_atom_bios) {
>  		dev_err(adev->dev, "Expecting atombios for GPU\n");
>  		r = -EINVAL;
> -		goto failed;
> +		goto check_runtime;
>  	}
>  	r = amdgpu_atombios_init(adev);
>  	if (r) {
>  		dev_err(adev->dev, "amdgpu_atombios_init failed\n");
> -		goto failed;
> +		goto check_runtime;
>  	}
> 
>  	/* See if the asic supports SR-IOV */
> @@ -1595,7 +1595,7 @@ int amdgpu_device_init(struct amdgpu_device
> *adev,
>  		if (!adev->bios) {
>  			dev_err(adev->dev, "Card not posted and no BIOS -
> ignoring\n");
>  			r = -EINVAL;
> -			goto failed;
> +			goto check_runtime;
>  		}
>  		DRM_INFO("GPU not posted. posting now...\n");
>  		amdgpu_atom_asic_init(adev->mode_info.atom_context);
> @@ -1605,7 +1605,7 @@ int amdgpu_device_init(struct amdgpu_device
> *adev,
>  	r = amdgpu_atombios_get_clock_info(adev);
>  	if (r) {
>  		dev_err(adev->dev, "amdgpu_atombios_get_clock_info
> failed\n");
> -		goto failed;
> +		goto check_runtime;
>  	}
>  	/* init i2c buses */
>  	amdgpu_atombios_i2c_init(adev);
> @@ -1614,7 +1614,7 @@ int amdgpu_device_init(struct amdgpu_device
> *adev,
>  	r = amdgpu_fence_driver_init(adev);
>  	if (r) {
>  		dev_err(adev->dev, "amdgpu_fence_driver_init failed\n");
> -		goto failed;
> +		goto check_runtime;
>  	}
> 
>  	/* init the mode config */
> @@ -1624,7 +1624,7 @@ int amdgpu_device_init(struct amdgpu_device
> *adev,
>  	if (r) {
>  		dev_err(adev->dev, "amdgpu_init failed\n");
>  		amdgpu_fini(adev);
> -		goto failed;
> +		goto check_runtime;
>  	}
> 
>  	adev->accel_working = true;
> @@ -1634,7 +1634,7 @@ int amdgpu_device_init(struct amdgpu_device
> *adev,
>  	r = amdgpu_ib_pool_init(adev);
>  	if (r) {
>  		dev_err(adev->dev, "IB initialization failed (%d).\n", r);
> -		goto failed;
> +		goto check_runtime;
>  	}
> 
>  	r = amdgpu_ib_ring_tests(adev);
> @@ -1682,12 +1682,11 @@ int amdgpu_device_init(struct amdgpu_device
> *adev,
>  	r = amdgpu_late_init(adev);
>  	if (r) {
>  		dev_err(adev->dev, "amdgpu_late_init failed\n");
> -		goto failed;
> +		goto check_runtime;
>  	}
> 
>  	return 0;
> -
> -failed:
> + check_runtime:
>  	if (runtime)
>  		vga_switcheroo_fini_domain_pm_ops(adev->dev);
>  	return r;
> --
> 2.10.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ