* [PATCH 4/4] drm/amd/display: Fix warning comparing pointer to 0
@ 2024-07-01 7:04 Jiapeng Chong
2024-07-01 7:04 ` [PATCH 3/4] " Jiapeng Chong
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Jiapeng Chong @ 2024-07-01 7:04 UTC (permalink / raw)
To: harry.wentland
Cc: sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
christian.koenig, Xinhui.Pan, airlied, daniel, amd-gfx,
dri-devel, linux-kernel, Jiapeng Chong, Abaci Robot
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 <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9458
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
.../amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c
index 1a0da8c6df5a..f56abe9ab919 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c
@@ -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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/4] drm/amd/display: Fix warning comparing pointer to 0
2024-07-01 7:04 [PATCH 4/4] drm/amd/display: Fix warning comparing pointer to 0 Jiapeng Chong
@ 2024-07-01 7:04 ` Jiapeng Chong
2024-07-01 7:04 ` [PATCH 2/4] " Jiapeng Chong
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Jiapeng Chong @ 2024-07-01 7:04 UTC (permalink / raw)
To: harry.wentland
Cc: sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
christian.koenig, Xinhui.Pan, airlied, daniel, amd-gfx,
dri-devel, linux-kernel, Jiapeng Chong, Abaci Robot
Avoid 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.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9458
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
.../amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.c
index 657ec2e1b119..2c983daf2dad 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.c
@@ -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));
--
2.20.1.7.g153144c
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/4] drm/amd/display: Fix warning comparing pointer to 0
2024-07-01 7:04 [PATCH 4/4] drm/amd/display: Fix warning comparing pointer to 0 Jiapeng Chong
2024-07-01 7:04 ` [PATCH 3/4] " Jiapeng Chong
@ 2024-07-01 7:04 ` Jiapeng Chong
2024-07-01 7:04 ` [PATCH 1/4] " Jiapeng Chong
2024-07-01 19:22 ` [PATCH 4/4] " Alex Deucher
3 siblings, 0 replies; 5+ messages in thread
From: Jiapeng Chong @ 2024-07-01 7:04 UTC (permalink / raw)
To: harry.wentland
Cc: sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
christian.koenig, Xinhui.Pan, airlied, daniel, amd-gfx,
dri-devel, linux-kernel, Jiapeng Chong, Abaci Robot
Avoid 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.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9458
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
.../amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.c
index ce83c10253a2..55085b85f8ed 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.c
@@ -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));
--
2.20.1.7.g153144c
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] drm/amd/display: Fix warning comparing pointer to 0
2024-07-01 7:04 [PATCH 4/4] drm/amd/display: Fix warning comparing pointer to 0 Jiapeng Chong
2024-07-01 7:04 ` [PATCH 3/4] " Jiapeng Chong
2024-07-01 7:04 ` [PATCH 2/4] " Jiapeng Chong
@ 2024-07-01 7:04 ` Jiapeng Chong
2024-07-01 19:22 ` [PATCH 4/4] " Alex Deucher
3 siblings, 0 replies; 5+ messages in thread
From: Jiapeng Chong @ 2024-07-01 7:04 UTC (permalink / raw)
To: harry.wentland
Cc: sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
christian.koenig, Xinhui.Pan, airlied, daniel, amd-gfx,
dri-devel, linux-kernel, Jiapeng Chong, Abaci Robot
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.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9458
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
.../amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.c
index a34506a78c50..e0b9ece7901d 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.c
@@ -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));
--
2.20.1.7.g153144c
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4/4] drm/amd/display: Fix warning comparing pointer to 0
2024-07-01 7:04 [PATCH 4/4] drm/amd/display: Fix warning comparing pointer to 0 Jiapeng Chong
` (2 preceding siblings ...)
2024-07-01 7:04 ` [PATCH 1/4] " Jiapeng Chong
@ 2024-07-01 19:22 ` Alex Deucher
3 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2024-07-01 19:22 UTC (permalink / raw)
To: Jiapeng Chong
Cc: harry.wentland, sunpeng.li, Rodrigo.Siqueira, alexander.deucher,
christian.koenig, Xinhui.Pan, airlied, daniel, amd-gfx,
dri-devel, linux-kernel, Abaci Robot
Applied the series. Thanks!
Alex
On Mon, Jul 1, 2024 at 3:15 AM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> 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 <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9458
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
> .../amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c
> index 1a0da8c6df5a..f56abe9ab919 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/src/dml2_core/dml2_core_factory.c
> @@ -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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-07-01 19:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-01 7:04 [PATCH 4/4] drm/amd/display: Fix warning comparing pointer to 0 Jiapeng Chong
2024-07-01 7:04 ` [PATCH 3/4] " Jiapeng Chong
2024-07-01 7:04 ` [PATCH 2/4] " Jiapeng Chong
2024-07-01 7:04 ` [PATCH 1/4] " Jiapeng Chong
2024-07-01 19:22 ` [PATCH 4/4] " Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®