From: "Kazlauskas, Nicholas" <nicholas.kazlauskas@amd.com>
To: "Arnd Bergmann" <arnd@arndb.de>,
"Harry Wentland" <harry.wentland@amd.com>,
"Leo Li" <sunpeng.li@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David (ChunMing) Zhou" <David1.Zhou@amd.com>,
"David Airlie" <airlied@linux.ie>,
"Daniel Vetter" <daniel@ffwll.ch>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>,
Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v2] amdgpu: fix gcc-4.8 build warnings
Date: Wed, 29 Apr 2020 09:42:03 -0400 [thread overview]
Message-ID: <f9738a59-5c7d-57ad-0d56-6455d6938964@amd.com> (raw)
In-Reply-To: <20200429092207.4049268-1-arnd@arndb.de>
On 2020-04-29 5:20 a.m., Arnd Bergmann wrote:
> Older compilers warn about initializers with incorrect curly
> braces:
>
> drivers/gpu/drm/drm_dp_mst_topology.c: In function 'drm_dp_mst_dsc_aux_for_port':
> drivers/gpu/drm/drm_dp_mst_topology.c:5497:9: error: missing braces around initializer [-Werror=missing-braces]
> struct drm_dp_desc desc = { 0 };
> ^
>
> Change all instances in the amd gpu driver to using the GNU empty
> initializer extension.
These should actually be memset - instead of GCC complaining, it'll be
clang instead.
Regards,
Nicholas Kazlauskas
>
> Reviewed-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: some context changes linux-next stopped yesterday's patch from
> applying today.
> ---
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
> drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 2 +-
> drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 2 +-
> drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 6 +++---
> drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c | 6 +++---
> drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c | 2 +-
> drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c | 6 +++---
> 7 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 7f4417981bff..81ce3103d751 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -8695,7 +8695,7 @@ bool amdgpu_dm_psr_enable(struct dc_stream_state *stream)
> {
> struct dc_link *link = stream->link;
> unsigned int vsync_rate_hz = 0;
> - struct dc_static_screen_params params = {0};
> + struct dc_static_screen_params params = { };
> /* Calculate number of static frames before generating interrupt to
> * enter PSR.
> */
> diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
> index 37fa7b48250e..5484a316eaa8 100644
> --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
> +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
> @@ -294,7 +294,7 @@ static enum bp_result bios_parser_get_i2c_info(struct dc_bios *dcb,
> struct atom_display_object_path_v2 *object;
> struct atom_common_record_header *header;
> struct atom_i2c_record *record;
> - struct atom_i2c_record dummy_record = {0};
> + struct atom_i2c_record dummy_record = { };
> struct bios_parser *bp = BP_FROM_DCB(dcb);
>
> if (!info)
> diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
> index 24c5765890fa..ee3ef5094fd1 100644
> --- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
> +++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
> @@ -698,7 +698,7 @@ void rn_clk_mgr_construct(
> struct dccg *dccg)
> {
> struct dc_debug_options *debug = &ctx->dc->debug;
> - struct dpm_clocks clock_table = { 0 };
> + struct dpm_clocks clock_table = { };
>
> clk_mgr->base.ctx = ctx;
> clk_mgr->base.funcs = &dcn21_funcs;
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> index 9ef9e50a34fa..7cbfe740a947 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
> @@ -2683,9 +2683,9 @@ static void dp_test_send_link_test_pattern(struct dc_link *link)
>
> static void dp_test_get_audio_test_data(struct dc_link *link, bool disable_video)
> {
> - union audio_test_mode dpcd_test_mode = {0};
> - struct audio_test_pattern_type dpcd_pattern_type = {0};
> - union audio_test_pattern_period dpcd_pattern_period[AUDIO_CHANNELS_COUNT] = {0};
> + union audio_test_mode dpcd_test_mode = { };
> + struct audio_test_pattern_type dpcd_pattern_type = { };
> + union audio_test_pattern_period dpcd_pattern_period[AUDIO_CHANNELS_COUNT] = { };
> enum dp_test_pattern test_pattern = DP_TEST_PATTERN_AUDIO_OPERATOR_DEFINED;
>
> struct pipe_ctx *pipes = link->dc->current_state->res_ctx.pipe_ctx;
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c
> index 84d7ac5dd206..dfa541f0b0d3 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hubp.c
> @@ -1253,9 +1253,9 @@ void hubp2_validate_dml_output(struct hubp *hubp,
> struct _vcs_dpi_display_ttu_regs_st *dml_ttu_attr)
> {
> struct dcn20_hubp *hubp2 = TO_DCN20_HUBP(hubp);
> - struct _vcs_dpi_display_rq_regs_st rq_regs = {0};
> - struct _vcs_dpi_display_dlg_regs_st dlg_attr = {0};
> - struct _vcs_dpi_display_ttu_regs_st ttu_attr = {0};
> + struct _vcs_dpi_display_rq_regs_st rq_regs = { };
> + struct _vcs_dpi_display_dlg_regs_st dlg_attr = { };
> + struct _vcs_dpi_display_ttu_regs_st ttu_attr = { };
> DC_LOGGER_INIT(ctx->logger);
> DC_LOG_DEBUG("DML Validation | Running Validation");
>
> 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 60ea499c1ca8..beea5e129c24 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c
> @@ -449,7 +449,7 @@ struct _vcs_dpi_soc_bounding_box_st dcn2_0_nv14_soc = {
> .use_urgent_burst_bw = 0
> };
>
> -struct _vcs_dpi_soc_bounding_box_st dcn2_0_nv12_soc = { 0 };
> +struct _vcs_dpi_soc_bounding_box_st dcn2_0_nv12_soc = { };
>
> #ifndef mmDP0_DP_DPHY_INTERNAL_CTRL
> #define mmDP0_DP_DPHY_INTERNAL_CTRL 0x210f
> diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c
> index 960a0716dde5..4aae6fb333bb 100644
> --- a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c
> +++ b/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_hubp.c
> @@ -365,9 +365,9 @@ void hubp21_validate_dml_output(struct hubp *hubp,
> struct _vcs_dpi_display_ttu_regs_st *dml_ttu_attr)
> {
> struct dcn21_hubp *hubp21 = TO_DCN21_HUBP(hubp);
> - struct _vcs_dpi_display_rq_regs_st rq_regs = {0};
> - struct _vcs_dpi_display_dlg_regs_st dlg_attr = {0};
> - struct _vcs_dpi_display_ttu_regs_st ttu_attr = {0};
> + struct _vcs_dpi_display_rq_regs_st rq_regs = { };
> + struct _vcs_dpi_display_dlg_regs_st dlg_attr = { };
> + struct _vcs_dpi_display_ttu_regs_st ttu_attr = { };
> DC_LOGGER_INIT(ctx->logger);
> DC_LOG_DEBUG("DML Validation | Running Validation");
>
>
next prev parent reply other threads:[~2020-04-29 13:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 9:20 [PATCH] [v2] amdgpu: fix gcc-4.8 build warnings Arnd Bergmann
2020-04-29 13:42 ` Kazlauskas, Nicholas [this message]
2020-04-29 20:16 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f9738a59-5c7d-57ad-0d56-6455d6938964@amd.com \
--to=nicholas.kazlauskas@amd.com \
--cc=Bhawanpreet.Lakha@amd.com \
--cc=David1.Zhou@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=arnd@arndb.de \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=harry.wentland@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sunpeng.li@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).