linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] media: venus: use NULL instead of zero for pointers
@ 2021-04-08  7:40 Mauro Carvalho Chehab
  2021-04-08  7:40 ` [PATCH 3/3] media: venus: don't de-reference NULL pointers at IRQ time Mauro Carvalho Chehab
  2021-04-09 11:08 ` [PATCH 1/3] media: venus: use NULL instead of zero for pointers Stanimir Varbanov
  0 siblings, 2 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2021-04-08  7:40 UTC (permalink / raw)
  Cc: linuxarm, mauro.chehab, Mauro Carvalho Chehab, Andy Gross,
	Bjorn Andersson, Mauro Carvalho Chehab, Stanimir Varbanov,
	linux-arm-msm, linux-kernel, linux-media

As reported by sparse:

	drivers/media/platform/qcom/venus/core.c:227:41: warning: Using plain integer as NULL pointer
	drivers/media/platform/qcom/venus/core.c:228:34: warning: Using plain integer as NULL pointer

Two vars are using zero instead of NULL for pointers. Not really
an issue, but using NULL makes it clearer that the init data is
expecting a pointer.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 drivers/media/platform/qcom/venus/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index f5b88b96f5f7..4451e3c11bc0 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -224,8 +224,8 @@ static void venus_assign_register_offsets(struct venus_core *core)
 		core->cpu_cs_base = core->base + CPU_CS_BASE;
 		core->cpu_ic_base = core->base + CPU_IC_BASE;
 		core->wrapper_base = core->base + WRAPPER_BASE;
-		core->wrapper_tz_base = 0;
-		core->aon_base = 0;
+		core->wrapper_tz_base = NULL;
+		core->aon_base = NULL;
 	}
 }
 
-- 
2.30.2


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

end of thread, other threads:[~2021-04-09 11:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08  7:40 [PATCH 1/3] media: venus: use NULL instead of zero for pointers Mauro Carvalho Chehab
2021-04-08  7:40 ` [PATCH 3/3] media: venus: don't de-reference NULL pointers at IRQ time Mauro Carvalho Chehab
2021-04-09 11:08   ` Stanimir Varbanov
2021-04-09 11:08 ` [PATCH 1/3] media: venus: use NULL instead of zero for pointers Stanimir Varbanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).