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

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

 



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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux