From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viresh Kumar Subject: Re: [PATCH] drm/msm/mdp5: Fix compilation warnings Date: Wed, 19 Jul 2017 18:26:12 +0530 Message-ID: <20170719125612.GG352@vireshk-i7> References: <627f428ee808c68e28d9f97a88191fbbe3ed389f.1498727804.git.viresh.kumar@linaro.org> <150046643091.30670.12161137449702421099@mail.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pg0-f54.google.com ([74.125.83.54]:38830 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753098AbdGSM4P (ORCPT ); Wed, 19 Jul 2017 08:56:15 -0400 Received: by mail-pg0-f54.google.com with SMTP id s4so1746266pgr.5 for ; Wed, 19 Jul 2017 05:56:15 -0700 (PDT) Content-Disposition: inline In-Reply-To: <150046643091.30670.12161137449702421099@mail.alporthouse.com> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Chris Wilson Cc: Rob Clark , freedreno@lists.freedesktop.org, Vincent Guittot , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org On 19-07-17, 13:13, Chris Wilson wrote: > Quoting Viresh Kumar (2017-06-29 10:19:59) > > diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c > > index 7d3741215387..0ee9bd0041cd 100644 > > --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c > > +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c > > @@ -889,8 +889,8 @@ static int mdp5_plane_mode_set(struct drm_plane *plane, > > struct mdp5_hw_pipe *right_hwpipe; > > const struct mdp_format *format; > > uint32_t nplanes, config = 0; > > - struct phase_step step = { 0 }; > > - struct pixel_ext pe = { 0 }; > > + struct phase_step step = { { 0 } }; > > + struct pixel_ext pe = { { 0 } }; > > uint32_t hdecm = 0, vdecm = 0; > > uint32_t pix_format; > > unsigned int rotation; > > Or just use {} to initialise to zero whatever the struct layout? Maybe, as GNU C allows that but ANSI C doesn't. -- viresh