Skip to contentSkip to conversation

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

PATCH Applied Jiapeng Chong 2 participants 2 messages Nov 24, 2021

Subsystems (4)

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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

Fix the following coccicheck warning:

./drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c:96:14-15: WARNING comparing pointer to 0.

---
 drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c +1 -1
index 122ba29..ec636d0 100644
@@ -93,7 +93,7 @@ static void get_qp_set(qp_set qps, enum colour_mode cm, enum bits_per_comp bpc,
 		TABLE_CASE(420, 12, min);
 	}
 
-	if (table == 0)
+	if (!table)
 		return;
 
 	index = (bpp - table[0].bpp) * 2;
Signature · 1 line
1.8.3.1
Reviewed-by Rodrigo Siqueira on v1 1/1 Applied
#1 lore raw
Quoted 17 lines · Jiapeng Chong

Fix the following coccicheck warning:

./drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c:96:14-15: WARNING comparing pointer to 0.

---
  drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c +0 -0
index 122ba29..ec636d0 100644

drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c static void get_qp_set(qp_set qps, enum colour_mode cm, enum bits_per_comp bpc, · line 99

Quoted 8 lines
drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c +1 -1
@@ -93,7 +93,7 @@ static void get_qp_set(qp_set qps, enum colour_mode cm, enum bits_per_comp bpc,
  		TABLE_CASE(420, 12, min);
  	}
 
-	if (table == 0)
+	if (!table)
  		return;
 
  	index = (bpp - table[0].bpp) * 2;

Applied to amd-staging-drm-next

Thanks