[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_OzUR12aLNgF1fO2JNZOwK=7z8SP8GvsWtSZo9bjnOVKg@mail.gmail.com>
Date: Fri, 4 Oct 2019 08:47:04 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: Raul E Rangel <rrangel@...omium.org>
Cc: amd-gfx list <amd-gfx@...ts.freedesktop.org>,
"David (ChunMing) Zhou" <David1.Zhou@....com>,
Charlene Liu <charlene.liu@....com>,
Leo Li <sunpeng.li@....com>,
Harry Wentland <harry.wentland@....com>,
David Airlie <airlied@...ux.ie>,
LKML <linux-kernel@...r.kernel.org>,
Maling list - DRI developers
<dri-devel@...ts.freedesktop.org>,
Nikola Cornij <nikola.cornij@....com>,
Dmytro Laktyushkin <Dmytro.Laktyushkin@....com>,
hersen wu <hersenxs.wu@....com>,
Daniel Vetter <daniel@...ll.ch>,
Alex Deucher <alexander.deucher@....com>,
Jun Lei <Jun.Lei@....com>,
Bhawanpreet Lakha <Bhawanpreet.Lakha@....com>,
Christian König <christian.koenig@....com>
Subject: Re: [PATCH v3] drm/amd/display: fix struct init in update_bounding_box
On Thu, Oct 3, 2019 at 4:35 PM Raul E Rangel <rrangel@...omium.org> wrote:
>
> dcn20_resource.c:2636:9: error: missing braces around initializer [-Werror=missing-braces]
> struct _vcs_dpi_voltage_scaling_st calculated_states[MAX_CLOCK_LIMIT_STATES] = {0};
> ^
>
> Fixes: 7ed4e6352c16f ("drm/amd/display: Add DCN2 HW Sequencer and Resource")
>
> Signed-off-by: Raul E Rangel <rrangel@...omium.org>
Applied. thanks!
Alex
>
> ---
>
> Changes in v3:
> - Use memset
>
> Changes in v2:
> - Use {{0}} instead of {}
>
> drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> index b949e202d6cb7..f72c26ae41def 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> @@ -2633,7 +2633,7 @@ static void cap_soc_clocks(
> static void update_bounding_box(struct dc *dc, struct _vcs_dpi_soc_bounding_box_st *bb,
> struct pp_smu_nv_clock_table *max_clocks, unsigned int *uclk_states, unsigned int num_states)
> {
> - struct _vcs_dpi_voltage_scaling_st calculated_states[MAX_CLOCK_LIMIT_STATES] = {0};
> + struct _vcs_dpi_voltage_scaling_st calculated_states[MAX_CLOCK_LIMIT_STATES];
> int i;
> int num_calculated_states = 0;
> int min_dcfclk = 0;
> @@ -2641,6 +2641,8 @@ static void update_bounding_box(struct dc *dc, struct _vcs_dpi_soc_bounding_box_
> if (num_states == 0)
> return;
>
> + memset(calculated_states, 0, sizeof(calculated_states));
> +
> if (dc->bb_overrides.min_dcfclk_mhz > 0)
> min_dcfclk = dc->bb_overrides.min_dcfclk_mhz;
> else
> --
> 2.23.0.444.g18eeb5a265-goog
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Powered by blists - more mailing lists