Re: [PATCH] drm/amd/display: Remove condition which is always set to True

2021-04-28 Thread Alex Deucher
On Fri, Apr 23, 2021 at 4:57 PM Souptick Joarder  wrote:
>
> Kernel test robot throws below warning ->
>
> >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:3015:53:
> >> warning: address of 'aconnector->mst_port->mst_mgr' will always
> >> evaluate to 'true' [-Wpointer-bool-conversion]
>if (!(aconnector->port &&
> >mst_port->mst_mgr))
>   ~~
> ~~^~~
>
> Remove the condition which is always set to True.
>
> Reported-by: kernel test robot 
> Signed-off-by: Souptick Joarder 
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c 
> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> index 9a13f47..8f7df11 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> @@ -3012,7 +3012,7 @@ static int trigger_hpd_mst_set(void *data, u64 val)
> if (!aconnector->dc_link)
> continue;
>
> -   if (!(aconnector->port && 
> >mst_port->mst_mgr))
> +   if (!aconnector->port)

@Harry Wentland any idea what this is supposed to be checking for?

Alex


> continue;
>
> link = aconnector->dc_link;
> --
> 1.9.1
>
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH] drm/amd/display: Remove condition which is always set to True

2021-04-23 Thread Souptick Joarder
Kernel test robot throws below warning ->

>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_debugfs.c:3015:53:
>> warning: address of 'aconnector->mst_port->mst_mgr' will always
>> evaluate to 'true' [-Wpointer-bool-conversion]
   if (!(aconnector->port &&
>mst_port->mst_mgr))
  ~~
~~^~~

Remove the condition which is always set to True.

Reported-by: kernel test robot 
Signed-off-by: Souptick Joarder 
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
index 9a13f47..8f7df11 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
@@ -3012,7 +3012,7 @@ static int trigger_hpd_mst_set(void *data, u64 val)
if (!aconnector->dc_link)
continue;
 
-   if (!(aconnector->port && 
>mst_port->mst_mgr))
+   if (!aconnector->port)
continue;
 
link = aconnector->dc_link;
-- 
1.9.1

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx