Re: [PATCH 3/3] drm/amdgpu: Remove superfluous NULL check

2020-09-02 Thread Christian König

Am 02.09.20 um 08:59 schrieb Daniel Vetter:

On Tue, Sep 01, 2020 at 09:06:45PM -0400, Luben Tuikov wrote:

The DRM device is a static member of
the amdgpu device structure and as such
always exists, so long as the PCI and
thus the amdgpu device exist.

Signed-off-by: Luben Tuikov 

On this patch, but not the other two earlier in this series:

Acked-by: Daniel Vetter 


---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ---
  1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index c4900471beb0..6dcc256b9ebc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3471,9 +3471,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool 
fbcon)
struct drm_connector_list_iter iter;
int r;
  
-	if (!dev)

-   return -ENODEV;
-
adev = drm_to_adev(dev);


Maybe this could now even fit into the declaration of adev.

But either way Acked-by: Christian König .

Christian.

  
  	if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)

--
2.28.0.394.ge197136389



___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 3/3] drm/amdgpu: Remove superfluous NULL check

2020-09-02 Thread Daniel Vetter
On Tue, Sep 01, 2020 at 09:06:45PM -0400, Luben Tuikov wrote:
> The DRM device is a static member of
> the amdgpu device structure and as such
> always exists, so long as the PCI and
> thus the amdgpu device exist.
> 
> Signed-off-by: Luben Tuikov 

On this patch, but not the other two earlier in this series:

Acked-by: Daniel Vetter 

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index c4900471beb0..6dcc256b9ebc 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3471,9 +3471,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool 
> fbcon)
>   struct drm_connector_list_iter iter;
>   int r;
>  
> - if (!dev)
> - return -ENODEV;
> -
>   adev = drm_to_adev(dev);
>  
>   if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
> -- 
> 2.28.0.394.ge197136389
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH 3/3] drm/amdgpu: Remove superfluous NULL check

2020-09-01 Thread Luben Tuikov
The DRM device is a static member of
the amdgpu device structure and as such
always exists, so long as the PCI and
thus the amdgpu device exist.

Signed-off-by: Luben Tuikov 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index c4900471beb0..6dcc256b9ebc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3471,9 +3471,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool 
fbcon)
struct drm_connector_list_iter iter;
int r;
 
-   if (!dev)
-   return -ENODEV;
-
adev = drm_to_adev(dev);
 
if (dev->switch_power_state == DRM_SWITCH_POWER_OFF)
-- 
2.28.0.394.ge197136389

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel