drm/amd/display: Fix warning comparing pointer to 0
Subsystems (3)
PATCH 4/4 drm/amd/display: Fix warning comparing pointer to 0
Avoid pointer type value compared with 0 to make code clear.
./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c:14:12-13: WARNING comparing pointer to 0.
--- .../amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c +1 -1
@@ -11,7 +11,7 @@ bool dml2_core_create(enum dml2_project_id project_id, struct dml2_core_instance {bool result = false; -if (out ==0 ) +if (!out)return false;memset (out,0 ,sizeof (struct dml2_core_instance ));
Signature · 1 line
2.20.1.7.g153144c
PATCH 1/4 drm/amd/display: Fix warning comparing pointer to 0
Avoid pointer type value compared with 0 to make code clear.
./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.c:31:12-13: WARNING comparing pointer to 0.
--- .../amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.c +1 -1
@@ -28,7 +28,7 @@ bool dml2_pmo_create(enum dml2_project_id project_id, struct dml2_pmo_instance * {bool result = false; -if (out ==0 ) +if (!out)return false;memset (out,0 ,sizeof (struct dml2_pmo_instance ));
Signature · 1 line
2.20.1.7.g153144c
PATCH 2/4 drm/amd/display: Fix warning comparing pointer to 0
In reply to Jiapeng ChongAvoid pointer type value compared with 0 to make code clear.
./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.c:19:12-13: WARNING comparing pointer to 0.
--- .../amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.c +1 -1
@@ -16,7 +16,7 @@ bool dml2_mcg_create(enum dml2_project_id project_id, struct dml2_mcg_instance * {bool result = false; -if (out ==0 ) +if (!out)return false;memset (out,0 ,sizeof (struct dml2_mcg_instance ));
Signature · 1 line
2.20.1.7.g153144c
PATCH 3/4 drm/amd/display: Fix warning comparing pointer to 0
In reply to Jiapeng ChongAvoid pointer type value compared with 0 to make code clear.
./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.c:24:12-13: WARNING comparing pointer to 0.
--- .../amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.c +1 -1
@@ -21,7 +21,7 @@ bool dml2_dpmm_create(enum dml2_project_id project_id, struct dml2_dpmm_instance {bool result = false; -if (out ==0 ) +if (!out)return false;memset (out,0 ,sizeof (struct dml2_dpmm_instance ));
Signature · 1 line
2.20.1.7.g153144c
Alex Deucher
AppliedApplied the series. Thanks!
Alex
Quoted 28 lines · Jiapeng Chong
Avoid pointer type value compared with 0 to make code clear.
./drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c:14:12-13: WARNING comparing pointer to 0.
Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- .../amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c +1
-2@@ -11,7 +11,7 @@ bool dml2_core_create(enum dml2_project_id project_id, struct dml2_core_instance {bool result = false; -if (out ==0 ) +if (!out)return false;memset (out,0 ,sizeof (struct dml2_core_instance )); --2.20.1.7.g153144c