[PATCH 2/2] drm/amdgpu:cleanup

Deucher, Alexander Alexander.Deucher at amd.com
Thu Feb 9 04:06:59 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Monk Liu
> Sent: Wednesday, February 08, 2017 10:50 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Liu, Monk
> Subject: [PATCH 2/2] drm/amdgpu:cleanup
> 
> 1)remove braces not needed
> 2)don't return failure on debugfs_firmware_init failed

I'd split these in two, one that is pure cleanup, and the second which drops the early return.  With that fixed:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> 
> Change-Id: I90ec3197184d0fdda54575bfbad7b705aa178698
> Signed-off-by: Monk Liu <Monk.Liu at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index abd7e15..0d33bc9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1931,20 +1931,16 @@ int amdgpu_device_init(struct amdgpu_device
> *adev,
>  	amdgpu_fbdev_init(adev);
> 
>  	r = amdgpu_gem_debugfs_init(adev);
> -	if (r) {
> +	if (r)
>  		DRM_ERROR("registering gem debugfs failed (%d).\n", r);
> -	}
> 
>  	r = amdgpu_debugfs_regs_init(adev);
> -	if (r) {
> +	if (r)
>  		DRM_ERROR("registering register debugfs failed (%d).\n", r);
> -	}
> 
>  	r = amdgpu_debugfs_firmware_init(adev);
> -	if (r) {
> +	if (r)
>  		DRM_ERROR("registering firmware debugfs failed (%d).\n",
> r);
> -		return r;
> -	}
> 
>  	if ((amdgpu_testing & 1)) {
>  		if (adev->accel_working)
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list