* [PATCH] drm/amd/powerplay: Delete a redundant memory setting in vega20_set_default_od8_setttings()
@ 2019-06-17 12:34 Markus Elfring
[not found] ` <de3f6a5e-8ac4-bc8e-0d0c-3a4a5db283e9-S0/GAf8tV78@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2019-06-17 12:34 UTC (permalink / raw)
To: dri-devel, amd-gfx, Alex Deucher, Christian König,
Daniel Vetter, David Airlie, David (ChunMing) Zhou, Evan Quan,
Rex Zhu
Cc: kernel-janitors, LKML
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 17 Jun 2019 14:24:14 +0200
The memory was set to zero already by a call of the function “kzalloc”.
Thus remove an extra call of the function “memset” for this purpose.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
index 4aa8f5a69c4c..62497ad66a39 100644
--- a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
+++ b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
@@ -1295,7 +1295,6 @@ static int vega20_set_default_od8_setttings(struct smu_context *smu)
if (!table_context->od8_settings)
return -ENOMEM;
- memset(table_context->od8_settings, 0, sizeof(struct vega20_od8_settings));
od8_settings = (struct vega20_od8_settings *)table_context->od8_settings;
if (smu_feature_is_enabled(smu, FEATURE_DPM_SOCCLK_BIT)) {
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amd/powerplay: Delete a redundant memory setting in vega20_set_default_od8_setttings
[not found] ` <de3f6a5e-8ac4-bc8e-0d0c-3a4a5db283e9-S0/GAf8tV78@public.gmane.org>
@ 2019-06-17 15:06 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2019-06-17 15:06 UTC (permalink / raw)
To: Markus Elfring
Cc: David (ChunMing) Zhou, David Airlie,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA, LKML, amd-gfx list,
Maling list - DRI developers, Daniel Vetter, Alex Deucher,
Evan Quan, Rex Zhu, Christian König
Applied this and the dc patch.
Thanks!
Alex
On Mon, Jun 17, 2019 at 10:07 AM Markus Elfring <Markus.Elfring@web.de> wrote:
>
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Mon, 17 Jun 2019 14:24:14 +0200
>
> The memory was set to zero already by a call of the function “kzalloc”.
> Thus remove an extra call of the function “memset” for this purpose.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> index 4aa8f5a69c4c..62497ad66a39 100644
> --- a/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> +++ b/drivers/gpu/drm/amd/powerplay/vega20_ppt.c
> @@ -1295,7 +1295,6 @@ static int vega20_set_default_od8_setttings(struct smu_context *smu)
> if (!table_context->od8_settings)
> return -ENOMEM;
>
> - memset(table_context->od8_settings, 0, sizeof(struct vega20_od8_settings));
> od8_settings = (struct vega20_od8_settings *)table_context->od8_settings;
>
> if (smu_feature_is_enabled(smu, FEATURE_DPM_SOCCLK_BIT)) {
> --
> 2.22.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-17 15:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 12:34 [PATCH] drm/amd/powerplay: Delete a redundant memory setting in vega20_set_default_od8_setttings() Markus Elfring
[not found] ` <de3f6a5e-8ac4-bc8e-0d0c-3a4a5db283e9-S0/GAf8tV78@public.gmane.org>
2019-06-17 15:06 ` [PATCH] drm/amd/powerplay: Delete a redundant memory setting in vega20_set_default_od8_setttings Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).