All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: use NULL instead of using plain integer as pointer
@ 2022-03-22  9:58 ` Haowen Bai
  0 siblings, 0 replies; 9+ messages in thread
From: Haowen Bai @ 2022-03-22  9:58 UTC (permalink / raw)
  To: harry.wentland, sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
	christian.koenig, Xinhui.Pan
  Cc: amd-gfx, dri-devel, linux-kernel, Haowen Bai

This fixes the following sparse warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dsc/rc_calc_fpu.c:71:40: warning: Using
plain integer as NULL pointer

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c b/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c
index ec636d0..ef75eb7 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dsc/rc_calc_fpu.c
@@ -68,7 +68,7 @@ static void get_qp_set(qp_set qps, enum colour_mode cm, enum bits_per_comp bpc,
 	int sel = table_hash(mode, bpc, max_min);
 	int table_size = 0;
 	int index;
-	const struct qp_entry *table = 0L;
+	const struct qp_entry *table = NULL;
 
 	// alias enum
 	enum { min = DAL_MM_MIN, max = DAL_MM_MAX };
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH] drm/amd/display: use NULL instead of using plain integer as pointer
@ 2022-03-22 10:03 ` Haowen Bai
  0 siblings, 0 replies; 9+ messages in thread
From: Haowen Bai @ 2022-03-22 10:03 UTC (permalink / raw)
  To: harry.wentland, sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
	christian.koenig, Xinhui.Pan
  Cc: amd-gfx, dri-devel, linux-kernel, Haowen Bai

This fixes the following sparse warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_resource.c:1910:16: warning: Using
plain integer as NULL pointer

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index 18757c1..99ccac3 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -1907,7 +1907,7 @@ static struct audio *find_first_free_audio(
 			return pool->audios[i];
 		}
 	}
-	return 0;
+	return NULL;
 }
 
 /*
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH] drm/amd/display: use NULL instead of using plain integer as pointer
@ 2022-03-22 10:09 ` Haowen Bai
  0 siblings, 0 replies; 9+ messages in thread
From: Haowen Bai @ 2022-03-22 10:09 UTC (permalink / raw)
  To: harry.wentland, sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
	christian.koenig, Xinhui.Pan
  Cc: amd-gfx, dri-devel, linux-kernel, Haowen Bai

This fixes the following sparse warnings:
drivers/gpu/drm/amd/amdgpu/../display/dc/dce112/dce112_resource.c:865:16: warning: Using
plain integer as NULL pointer

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
 drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
index ee55cda..560da6c 100644
--- a/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
@@ -862,7 +862,7 @@ static struct clock_source *find_matching_pll(
 		return NULL;
 	}
 
-	return 0;
+	return NULL;
 }
 
 static enum dc_status build_mapped_resource(
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-03-23 21:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-22  9:58 [PATCH] drm/amd/display: use NULL instead of using plain integer as pointer Haowen Bai
2022-03-22  9:58 ` Haowen Bai
2022-03-23 21:42 ` Alex Deucher
2022-03-23 21:42   ` Alex Deucher
2022-03-23 21:42   ` Alex Deucher
2022-03-22 10:03 Haowen Bai
2022-03-22 10:03 ` Haowen Bai
2022-03-22 10:09 Haowen Bai
2022-03-22 10:09 ` Haowen Bai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.