Re: [PATCH] drm/amd/pm: Fix power context allocation in SMU13

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 1, 2023 at 10:31 AM Hawking Zhang <Hawking.Zhang@xxxxxxx> wrote:
>
> From: Lijo Lazar <lijo.lazar@xxxxxxx>
>
> Use the right data structure for allocation.
>
> Signed-off-by: Lijo Lazar <lijo.lazar@xxxxxxx>
> Reviewed-by: Hawking Zhang <Hawking.Zhang@xxxxxxx>

Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx>

> ---
>  drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
> index da059b02a153..09ac66ab9c34 100644
> --- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
> +++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
> @@ -534,11 +534,11 @@ int smu_v13_0_init_power(struct smu_context *smu)
>         if (smu_power->power_context || smu_power->power_context_size != 0)
>                 return -EINVAL;
>
> -       smu_power->power_context = kzalloc(sizeof(struct smu_13_0_dpm_context),
> +       smu_power->power_context = kzalloc(sizeof(struct smu_13_0_power_context),
>                                            GFP_KERNEL);
>         if (!smu_power->power_context)
>                 return -ENOMEM;
> -       smu_power->power_context_size = sizeof(struct smu_13_0_dpm_context);
> +       smu_power->power_context_size = sizeof(struct smu_13_0_power_context);
>
>         return 0;
>  }
> --
> 2.17.1
>




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux