public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dipendra Khadka <kdipendra88@gmail.com>
To: airlied@gmail.com, daniel@ffwll.ch, harry.wentland@amd.com,
	sunpeng.li@amd.com, airlied@linux.ie, Rodrigo.Siqueira@amd.com,
	alexander.deucher@amd.com, Xinhui.Pan@amd.com
Cc: Dipendra Khadka <kdipendra88@gmail.com>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] Fix warning: Using plain integer as NULL pointer in dml2_pmo_dcn4.c
Date: Thu, 15 Aug 2024 18:18:25 +0000	[thread overview]
Message-ID: <20240815181827.65159-1-kdipendra88@gmail.com> (raw)

sparse reportef following warnings:

'''
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c:614:53: warning: Using plain integer as NULL pointer
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c:615:58: warning: Using plain integer as NULL pointer
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c:617:53: warning: Using plain integer as NULL pointer
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c:727:52: warning: Using plain integer as NULL pointer
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c:728:52: warning: Using plain integer as NULL pointer
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c:729:57: warning: Using plain integer as NULL pointer
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c:788:52: warning: Using plain integer as NULL pointer
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c:789:55: warning: Using plain integer as NULL pointer
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c:790:57: warning: Using plain integer as NULL pointer
drivers/gpu/drm/amd/amdgpu/../display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c:958:67: warning: Using plain integer as NULL pointer
'''

This patch changes zero to NULL.

Signed-off-by: Dipendra Khadka <kdipendra88@gmail.com>
---
 .../dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c   | 20 +++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c
index 8952dd7e36cb..6d524e528491 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4.c
@@ -611,10 +611,10 @@ static bool subvp_subvp_schedulable(struct dml2_pmo_instance *pmo, const struct
 	int max_microschedule_us = 0;
 	int vactive1_us, vactive2_us, vblank1_us, vblank2_us;
 
-	const struct dml2_timing_cfg *svp_timing1 = 0;
-	const struct dml2_implicit_svp_meta *svp_meta1 = 0;
+	const struct dml2_timing_cfg *svp_timing1 = NULL;
+	const struct dml2_implicit_svp_meta *svp_meta1 = NULL;
 
-	const struct dml2_timing_cfg *svp_timing2 = 0;
+	const struct dml2_timing_cfg *svp_timing2 = NULL;
 
 	if (svp_stream_count <= 1)
 		return true;
@@ -724,9 +724,9 @@ static bool validate_svp_drr_cofunctionality(struct dml2_pmo_instance *pmo,
 	int drr_stretched_vblank_us = 0;
 	int max_vblank_mallregion = 0;
 
-	const struct dml2_timing_cfg *svp_timing = 0;
-	const struct dml2_timing_cfg *drr_timing = 0;
-	const struct dml2_implicit_svp_meta *svp_meta = 0;
+	const struct dml2_timing_cfg *svp_timing = NULL;
+	const struct dml2_timing_cfg *drr_timing = NULL;
+	const struct dml2_implicit_svp_meta *svp_meta = NULL;
 
 	bool schedulable = false;
 
@@ -785,9 +785,9 @@ static bool validate_svp_vblank_cofunctionality(struct dml2_pmo_instance *pmo,
 	int vblank_stream_count = 0;
 	int svp_stream_count = 0;
 
-	const struct dml2_timing_cfg *svp_timing = 0;
-	const struct dml2_timing_cfg *vblank_timing = 0;
-	const struct dml2_implicit_svp_meta *svp_meta = 0;
+	const struct dml2_timing_cfg *svp_timing = NULL;
+	const struct dml2_timing_cfg *vblank_timing = NULL;
+	const struct dml2_implicit_svp_meta *svp_meta = NULL;
 
 	int prefetch_us = 0;
 	int mall_region_us = 0;
@@ -955,7 +955,7 @@ bool pmo_dcn4_init_for_pstate_support(struct dml2_pmo_init_for_pstate_support_in
 
 	struct display_configuation_with_meta *display_config;
 	const struct dml2_plane_parameters *plane_descriptor;
-	const enum dml2_pmo_pstate_strategy (*strategy_list)[4] = 0;
+	const enum dml2_pmo_pstate_strategy (*strategy_list)[4] = NULL;
 	unsigned int strategy_list_size = 0;
 	unsigned int plane_index, stream_index, i;
 
-- 
2.43.0


                 reply	other threads:[~2024-08-15 18:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240815181827.65159-1-kdipendra88@gmail.com \
    --to=kdipendra88@gmail.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sunpeng.li@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox