[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20240815181827.65159-1-kdipendra88@gmail.com>
Date: Thu, 15 Aug 2024 18:18:25 +0000
From: Dipendra Khadka <kdipendra88@...il.com>
To: airlied@...il.com,
daniel@...ll.ch,
harry.wentland@....com,
sunpeng.li@....com,
airlied@...ux.ie,
Rodrigo.Siqueira@....com,
alexander.deucher@....com,
Xinhui.Pan@....com
Cc: Dipendra Khadka <kdipendra88@...il.com>,
amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] Fix warning: Using plain integer as NULL pointer in dml2_pmo_dcn4.c
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@...il.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
Powered by blists - more mailing lists