Skip to contentSkip to conversation

drm/amd/display: Fix warning comparing pointer to 0

PATCH Applied Jiapeng Chong 2 participants 2 messages Sep 6, 2021 – Sep 7, 2021

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

PATCH 1/1 drm/amd/display: Fix warning comparing pointer to 0

From: chongjiapeng <[email protected]>

Fix the following coccicheck warning:

./drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c:643:35-36:
WARNING comparing pointer to 0.

---
 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c +1 -1
index 4a4894e..15491e3 100644
@@ -640,7 +640,7 @@ void dcn31_clk_mgr_construct(
 				sizeof(struct dcn31_watermarks),
 				&clk_mgr->smu_wm_set.mc_address.quad_part);
 
-	if (clk_mgr->smu_wm_set.wm_set == 0) {
+	if (!clk_mgr->smu_wm_set.wm_set) {
 		clk_mgr->smu_wm_set.wm_set = &dummy_wms;
 		clk_mgr->smu_wm_set.mc_address.quad_part = 0;
 	}
Signature · 1 line
1.8.3.1
Applied
#1 lore raw

Applied. Thanks!

Alex

Quoted 30 lines · Jiapeng Chong

From: chongjiapeng <[email protected]>

Fix the following coccicheck warning:

./drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c:643:35-36:
WARNING comparing pointer to 0.

---
 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn31/dcn31_clk_mgr.c +1 -2
index 4a4894e..15491e3 100644
@@ -640,7 +640,7 @@ void dcn31_clk_mgr_construct(
                                sizeof(struct dcn31_watermarks),
                                &clk_mgr->smu_wm_set.mc_address.quad_part);
 
-       if (clk_mgr->smu_wm_set.wm_set == 0) {
+       if (!clk_mgr->smu_wm_set.wm_set) {
                clk_mgr->smu_wm_set.wm_set = &dummy_wms;
                clk_mgr->smu_wm_set.mc_address.quad_part = 0;
        }
--

1.8.3.1