All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/omap: Use {} to zero initialize the mode
@ 2020-07-24 19:07 Ville Syrjala
  2020-07-24 19:43 ` Daniel Vetter
  2020-07-24 21:06 ` Laurent Pinchart
  0 siblings, 2 replies; 5+ messages in thread
From: Ville Syrjala @ 2020-07-24 19:07 UTC (permalink / raw)
  To: dri-devel; +Cc: Dave Airlie, Tomi Valkeinen, Laurent Pinchart

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The first member of drm_display_mode is no longer a structure, but
the code is still using {{0}} to zero initialize it. Make that just
{} so it works regardless of what lies inside.

Cc: Dave Airlie <airlied@redhat.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Fixes: 42acb06b01b1 ("drm: pahole struct drm_display_mode")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/omapdrm/omap_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
index 528764566b17..de95dc1b861c 100644
--- a/drivers/gpu/drm/omapdrm/omap_connector.c
+++ b/drivers/gpu/drm/omapdrm/omap_connector.c
@@ -89,7 +89,7 @@ static enum drm_mode_status omap_connector_mode_valid(struct drm_connector *conn
 				 struct drm_display_mode *mode)
 {
 	struct omap_connector *omap_connector = to_omap_connector(connector);
-	struct drm_display_mode new_mode = { { 0 } };
+	struct drm_display_mode new_mode = {};
 	enum drm_mode_status status;
 
 	status = omap_connector_mode_fixup(omap_connector->output, mode,
-- 
2.26.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/omap: Use {} to zero initialize the mode
  2020-07-24 19:07 [PATCH] drm/omap: Use {} to zero initialize the mode Ville Syrjala
@ 2020-07-24 19:43 ` Daniel Vetter
  2020-07-24 20:04   ` Ville Syrjälä
  2020-07-24 21:06 ` Laurent Pinchart
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Vetter @ 2020-07-24 19:43 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: Dave Airlie, Tomi Valkeinen, Laurent Pinchart, dri-devel

On Fri, Jul 24, 2020 at 9:07 PM Ville Syrjala
<ville.syrjala@linux.intel.com> wrote:
>
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> The first member of drm_display_mode is no longer a structure, but
> the code is still using {{0}} to zero initialize it. Make that just
> {} so it works regardless of what lies inside.
>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Fixes: 42acb06b01b1 ("drm: pahole struct drm_display_mode")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch.ch>

This needs to go into drm-misc-next-fixes, looks like Maarten has
already forward it so you can push it there.
-Daniel

> ---
>  drivers/gpu/drm/omapdrm/omap_connector.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
> index 528764566b17..de95dc1b861c 100644
> --- a/drivers/gpu/drm/omapdrm/omap_connector.c
> +++ b/drivers/gpu/drm/omapdrm/omap_connector.c
> @@ -89,7 +89,7 @@ static enum drm_mode_status omap_connector_mode_valid(struct drm_connector *conn
>                                  struct drm_display_mode *mode)
>  {
>         struct omap_connector *omap_connector = to_omap_connector(connector);
> -       struct drm_display_mode new_mode = { { 0 } };
> +       struct drm_display_mode new_mode = {};
>         enum drm_mode_status status;
>
>         status = omap_connector_mode_fixup(omap_connector->output, mode,
> --
> 2.26.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel



-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/omap: Use {} to zero initialize the mode
  2020-07-24 19:43 ` Daniel Vetter
@ 2020-07-24 20:04   ` Ville Syrjälä
  2020-07-24 20:10     ` Daniel Vetter
  0 siblings, 1 reply; 5+ messages in thread
From: Ville Syrjälä @ 2020-07-24 20:04 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Dave Airlie, Tomi Valkeinen, Laurent Pinchart, dri-devel

On Fri, Jul 24, 2020 at 09:43:45PM +0200, Daniel Vetter wrote:
> On Fri, Jul 24, 2020 at 9:07 PM Ville Syrjala
> <ville.syrjala@linux.intel.com> wrote:
> >
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > The first member of drm_display_mode is no longer a structure, but
> > the code is still using {{0}} to zero initialize it. Make that just
> > {} so it works regardless of what lies inside.
> >
> > Cc: Dave Airlie <airlied@redhat.com>
> > Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> > Fixes: 42acb06b01b1 ("drm: pahole struct drm_display_mode")
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch.ch>
> 
> This needs to go into drm-misc-next-fixes, looks like Maarten has
> already forward it so you can push it there.

Thanks for the review. Pushed.

-> vacation

-- 
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/omap: Use {} to zero initialize the mode
  2020-07-24 20:04   ` Ville Syrjälä
@ 2020-07-24 20:10     ` Daniel Vetter
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2020-07-24 20:10 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: Dave Airlie, Tomi Valkeinen, Laurent Pinchart, dri-devel

On Fri, Jul 24, 2020 at 10:04 PM Ville Syrjälä
<ville.syrjala@linux.intel.com> wrote:
>
> On Fri, Jul 24, 2020 at 09:43:45PM +0200, Daniel Vetter wrote:
> > On Fri, Jul 24, 2020 at 9:07 PM Ville Syrjala
> > <ville.syrjala@linux.intel.com> wrote:
> > >
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > The first member of drm_display_mode is no longer a structure, but
> > > the code is still using {{0}} to zero initialize it. Make that just
> > > {} so it works regardless of what lies inside.
> > >
> > > Cc: Dave Airlie <airlied@redhat.com>
> > > Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> > > Fixes: 42acb06b01b1 ("drm: pahole struct drm_display_mode")
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch.ch>
> >
> > This needs to go into drm-misc-next-fixes, looks like Maarten has
> > already forward it so you can push it there.
>
> Thanks for the review. Pushed.
>
> -> vacation

Enjoy!

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] drm/omap: Use {} to zero initialize the mode
  2020-07-24 19:07 [PATCH] drm/omap: Use {} to zero initialize the mode Ville Syrjala
  2020-07-24 19:43 ` Daniel Vetter
@ 2020-07-24 21:06 ` Laurent Pinchart
  1 sibling, 0 replies; 5+ messages in thread
From: Laurent Pinchart @ 2020-07-24 21:06 UTC (permalink / raw)
  To: Ville Syrjala; +Cc: Dave Airlie, Tomi Valkeinen, Laurent Pinchart, dri-devel

Hi Ville,

Thank you for the patch, and sorry for having let this issue slip
through the cracks :-S

On Fri, Jul 24, 2020 at 10:07:18PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> The first member of drm_display_mode is no longer a structure, but
> the code is still using {{0}} to zero initialize it. Make that just
> {} so it works regardless of what lies inside.
> 
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Fixes: 42acb06b01b1 ("drm: pahole struct drm_display_mode")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/gpu/drm/omapdrm/omap_connector.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
> index 528764566b17..de95dc1b861c 100644
> --- a/drivers/gpu/drm/omapdrm/omap_connector.c
> +++ b/drivers/gpu/drm/omapdrm/omap_connector.c
> @@ -89,7 +89,7 @@ static enum drm_mode_status omap_connector_mode_valid(struct drm_connector *conn
>  				 struct drm_display_mode *mode)
>  {
>  	struct omap_connector *omap_connector = to_omap_connector(connector);
> -	struct drm_display_mode new_mode = { { 0 } };
> +	struct drm_display_mode new_mode = {};
>  	enum drm_mode_status status;
>  
>  	status = omap_connector_mode_fixup(omap_connector->output, mode,

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-24 21:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-24 19:07 [PATCH] drm/omap: Use {} to zero initialize the mode Ville Syrjala
2020-07-24 19:43 ` Daniel Vetter
2020-07-24 20:04   ` Ville Syrjälä
2020-07-24 20:10     ` Daniel Vetter
2020-07-24 21:06 ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.