Skip to contentSkip to conversation

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

PATCH In review Souptick Joarder 2 participants 2 messages Apr 23, 2021 – Apr 28, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

Kernel test robot throws below warning ->

Quoted 3 lines
Quoted 3 lines

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 &&
&aconnector->mst_port->mst_mgr))
                                                  ~~

~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

Remove the condition which is always set to True.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +1 -1
index 9a13f47..8f7df11 100644
@@ -3012,7 +3012,7 @@ static int trigger_hpd_mst_set(void *data, u64 val)
 			if (!aconnector->dc_link)
 				continue;
 
-			if (!(aconnector->port && &aconnector->mst_port->mst_mgr))
+			if (!aconnector->port)
 				continue;
 
 			link = aconnector->dc_link;
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 24 lines · Souptick Joarder

Kernel test robot throws below warning ->

Quoted 3 lines
Quoted 3 lines

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 &&
&aconnector->mst_port->mst_mgr))
                                                  ~~

~~~~~~~~~~~~~~~~~~~~~~^~~~~~~

Remove the condition which is always set to True.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +0 -0
index 9a13f47..8f7df11 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c static int trigger_hpd_mst_set(void *data, u64 val) · line 3015

Quoted 5 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +1 -1
@@ -3012,7 +3012,7 @@ static int trigger_hpd_mst_set(void *data, u64 val)
                        if (!aconnector->dc_link)
                                continue;
 
-                       if (!(aconnector->port && &aconnector->mst_port->mst_mgr))
+                       if (!aconnector->port)

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

Alex

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c +0 -1
                                continue;
 
                        link = aconnector->dc_link;
--

1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx