[PATCH] drm/msm/mdp5: Fix compilation warnings

Viresh Kumar viresh.kumar at linaro.org
Wed Jul 19 12:56:12 UTC 2017


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


More information about the dri-devel mailing list