* [PATCH] drm/amd/display: Fix unnecessary cast warnings from checkpatch
@ 2024-09-17 16:31 Rohit Chavan
2024-09-18 14:03 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Rohit Chavan @ 2024-09-17 16:31 UTC (permalink / raw)
To: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, Xinhui Pan, David Airlie, Daniel Vetter,
amd-gfx, dri-devel, linux-kernel
Cc: Rohit Chavan
This patch addresses warnings produced by the checkpatch script
related to unnecessary casts that could potentially hide bugs.
The specific warnings are as follows:
- Warning at drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c:16
- Warning at drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c:20
- Warning at drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c:30
Signed-off-by: Rohit Chavan <roheetchavan@gmail.com>
---
drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c
index 41ecf00ed196..3ab401729f9b 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c
@@ -13,11 +13,11 @@
static bool dml21_allocate_memory(struct dml2_context **dml_ctx)
{
- *dml_ctx = (struct dml2_context *)kzalloc(sizeof(struct dml2_context), GFP_KERNEL);
+ *dml_ctx = kzalloc(sizeof(struct dml2_context), GFP_KERNEL);
if (!(*dml_ctx))
return false;
- (*dml_ctx)->v21.dml_init.dml2_instance = (struct dml2_instance *)kzalloc(sizeof(struct dml2_instance), GFP_KERNEL);
+ (*dml_ctx)->v21.dml_init.dml2_instance = kzalloc(sizeof(struct dml2_instance), GFP_KERNEL);
if (!((*dml_ctx)->v21.dml_init.dml2_instance))
return false;
@@ -27,7 +27,7 @@ static bool dml21_allocate_memory(struct dml2_context **dml_ctx)
(*dml_ctx)->v21.mode_support.display_config = &(*dml_ctx)->v21.display_config;
(*dml_ctx)->v21.mode_programming.display_config = (*dml_ctx)->v21.mode_support.display_config;
- (*dml_ctx)->v21.mode_programming.programming = (struct dml2_display_cfg_programming *)kzalloc(sizeof(struct dml2_display_cfg_programming), GFP_KERNEL);
+ (*dml_ctx)->v21.mode_programming.programming = kzalloc(sizeof(struct dml2_display_cfg_programming), GFP_KERNEL);
if (!((*dml_ctx)->v21.mode_programming.programming))
return false;
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amd/display: Fix unnecessary cast warnings from checkpatch
2024-09-17 16:31 [PATCH] drm/amd/display: Fix unnecessary cast warnings from checkpatch Rohit Chavan
@ 2024-09-18 14:03 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2024-09-18 14:03 UTC (permalink / raw)
To: Rohit Chavan
Cc: Harry Wentland, Leo Li, Rodrigo Siqueira, Alex Deucher,
Christian König, Xinhui Pan, David Airlie, Daniel Vetter,
amd-gfx, dri-devel, linux-kernel
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Applied.
Thanks!
On Tue, Sep 17, 2024 at 5:58 PM Rohit Chavan <roheetchavan@gmail.com> wrote:
>
> This patch addresses warnings produced by the checkpatch script
> related to unnecessary casts that could potentially hide bugs.
>
> The specific warnings are as follows:
> - Warning at drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c:16
> - Warning at drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c:20
> - Warning at drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c:30
>
> Signed-off-by: Rohit Chavan <roheetchavan@gmail.com>
> ---
> drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c
> index 41ecf00ed196..3ab401729f9b 100644
> --- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c
> +++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_wrapper.c
> @@ -13,11 +13,11 @@
>
> static bool dml21_allocate_memory(struct dml2_context **dml_ctx)
> {
> - *dml_ctx = (struct dml2_context *)kzalloc(sizeof(struct dml2_context), GFP_KERNEL);
> + *dml_ctx = kzalloc(sizeof(struct dml2_context), GFP_KERNEL);
> if (!(*dml_ctx))
> return false;
>
> - (*dml_ctx)->v21.dml_init.dml2_instance = (struct dml2_instance *)kzalloc(sizeof(struct dml2_instance), GFP_KERNEL);
> + (*dml_ctx)->v21.dml_init.dml2_instance = kzalloc(sizeof(struct dml2_instance), GFP_KERNEL);
> if (!((*dml_ctx)->v21.dml_init.dml2_instance))
> return false;
>
> @@ -27,7 +27,7 @@ static bool dml21_allocate_memory(struct dml2_context **dml_ctx)
> (*dml_ctx)->v21.mode_support.display_config = &(*dml_ctx)->v21.display_config;
> (*dml_ctx)->v21.mode_programming.display_config = (*dml_ctx)->v21.mode_support.display_config;
>
> - (*dml_ctx)->v21.mode_programming.programming = (struct dml2_display_cfg_programming *)kzalloc(sizeof(struct dml2_display_cfg_programming), GFP_KERNEL);
> + (*dml_ctx)->v21.mode_programming.programming = kzalloc(sizeof(struct dml2_display_cfg_programming), GFP_KERNEL);
> if (!((*dml_ctx)->v21.mode_programming.programming))
> return false;
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-18 14:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-17 16:31 [PATCH] drm/amd/display: Fix unnecessary cast warnings from checkpatch Rohit Chavan
2024-09-18 14:03 ` Alex Deucher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.