All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/gma500: remove helper function
@ 2016-02-02  6:05 ` Sudip Mukherjee
  0 siblings, 0 replies; 6+ messages in thread
From: Sudip Mukherjee @ 2016-02-02  6:05 UTC (permalink / raw)
  To: Patrik Jakobsson, David Airlie, Daniel Vetter
  Cc: linux-kernel, dri-devel, Sudip Mukherjee

We were getting build warning about:
drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:2: warning: initialization
	from incompatible pointer type

The callback to dpms was pointing to a helper function which had a
return type of void, whereas the callback should point to a function
which has a return type of int.
On closer look it turned out that we do not need the helper function
since if we call drm_helper_connector_dpms() directly, the first check
that drm_helper_connector_dpms() does is: if (mode == connector->dpms)

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/gpu/drm/gma500/mdfld_dsi_output.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
index d758f4c..907cb51 100644
--- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c
+++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
@@ -382,16 +382,6 @@ static int mdfld_dsi_connector_mode_valid(struct drm_connector *connector,
 	return MODE_OK;
 }
 
-static void mdfld_dsi_connector_dpms(struct drm_connector *connector, int mode)
-{
-	if (mode == connector->dpms)
-		return;
-
-	/*first, execute dpms*/
-
-	drm_helper_connector_dpms(connector, mode);
-}
-
 static struct drm_encoder *mdfld_dsi_connector_best_encoder(
 				struct drm_connector *connector)
 {
@@ -404,7 +394,7 @@ static struct drm_encoder *mdfld_dsi_connector_best_encoder(
 
 /*DSI connector funcs*/
 static const struct drm_connector_funcs mdfld_dsi_connector_funcs = {
-	.dpms = /*drm_helper_connector_dpms*/mdfld_dsi_connector_dpms,
+	.dpms = drm_helper_connector_dpms,
 	.detect = mdfld_dsi_connector_detect,
 	.fill_modes = drm_helper_probe_single_connector_modes,
 	.set_property = mdfld_dsi_connector_set_property,
-- 
1.9.1

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

* [PATCH] drm/gma500: remove helper function
@ 2016-02-02  6:05 ` Sudip Mukherjee
  0 siblings, 0 replies; 6+ messages in thread
From: Sudip Mukherjee @ 2016-02-02  6:05 UTC (permalink / raw)
  To: Patrik Jakobsson, David Airlie, Daniel Vetter
  Cc: linux-kernel, dri-devel, Sudip Mukherjee

We were getting build warning about:
drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:2: warning: initialization
	from incompatible pointer type

The callback to dpms was pointing to a helper function which had a
return type of void, whereas the callback should point to a function
which has a return type of int.
On closer look it turned out that we do not need the helper function
since if we call drm_helper_connector_dpms() directly, the first check
that drm_helper_connector_dpms() does is: if (mode == connector->dpms)

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/gpu/drm/gma500/mdfld_dsi_output.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
index d758f4c..907cb51 100644
--- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c
+++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
@@ -382,16 +382,6 @@ static int mdfld_dsi_connector_mode_valid(struct drm_connector *connector,
 	return MODE_OK;
 }
 
-static void mdfld_dsi_connector_dpms(struct drm_connector *connector, int mode)
-{
-	if (mode == connector->dpms)
-		return;
-
-	/*first, execute dpms*/
-
-	drm_helper_connector_dpms(connector, mode);
-}
-
 static struct drm_encoder *mdfld_dsi_connector_best_encoder(
 				struct drm_connector *connector)
 {
@@ -404,7 +394,7 @@ static struct drm_encoder *mdfld_dsi_connector_best_encoder(
 
 /*DSI connector funcs*/
 static const struct drm_connector_funcs mdfld_dsi_connector_funcs = {
-	.dpms = /*drm_helper_connector_dpms*/mdfld_dsi_connector_dpms,
+	.dpms = drm_helper_connector_dpms,
 	.detect = mdfld_dsi_connector_detect,
 	.fill_modes = drm_helper_probe_single_connector_modes,
 	.set_property = mdfld_dsi_connector_set_property,
-- 
1.9.1

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

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

* Re: [PATCH] drm/gma500: remove helper function
  2016-02-02  6:05 ` Sudip Mukherjee
@ 2016-02-06 17:09   ` Patrik Jakobsson
  -1 siblings, 0 replies; 6+ messages in thread
From: Patrik Jakobsson @ 2016-02-06 17:09 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: David Airlie, Daniel Vetter, linux-kernel, dri-devel

On Tue, Feb 2, 2016 at 7:05 AM, Sudip Mukherjee
<sudipm.mukherjee@gmail.com> wrote:
> We were getting build warning about:
> drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:2: warning: initialization
>         from incompatible pointer type
>
> The callback to dpms was pointing to a helper function which had a
> return type of void, whereas the callback should point to a function
> which has a return type of int.
> On closer look it turned out that we do not need the helper function
> since if we call drm_helper_connector_dpms() directly, the first check
> that drm_helper_connector_dpms() does is: if (mode == connector->dpms)
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>

Looks good, thanks.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

> ---
>  drivers/gpu/drm/gma500/mdfld_dsi_output.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> index d758f4c..907cb51 100644
> --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> @@ -382,16 +382,6 @@ static int mdfld_dsi_connector_mode_valid(struct drm_connector *connector,
>         return MODE_OK;
>  }
>
> -static void mdfld_dsi_connector_dpms(struct drm_connector *connector, int mode)
> -{
> -       if (mode == connector->dpms)
> -               return;
> -
> -       /*first, execute dpms*/
> -
> -       drm_helper_connector_dpms(connector, mode);
> -}
> -
>  static struct drm_encoder *mdfld_dsi_connector_best_encoder(
>                                 struct drm_connector *connector)
>  {
> @@ -404,7 +394,7 @@ static struct drm_encoder *mdfld_dsi_connector_best_encoder(
>
>  /*DSI connector funcs*/
>  static const struct drm_connector_funcs mdfld_dsi_connector_funcs = {
> -       .dpms = /*drm_helper_connector_dpms*/mdfld_dsi_connector_dpms,
> +       .dpms = drm_helper_connector_dpms,
>         .detect = mdfld_dsi_connector_detect,
>         .fill_modes = drm_helper_probe_single_connector_modes,
>         .set_property = mdfld_dsi_connector_set_property,
> --
> 1.9.1
>

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

* Re: [PATCH] drm/gma500: remove helper function
@ 2016-02-06 17:09   ` Patrik Jakobsson
  0 siblings, 0 replies; 6+ messages in thread
From: Patrik Jakobsson @ 2016-02-06 17:09 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: Daniel Vetter, linux-kernel, dri-devel

On Tue, Feb 2, 2016 at 7:05 AM, Sudip Mukherjee
<sudipm.mukherjee@gmail.com> wrote:
> We were getting build warning about:
> drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:2: warning: initialization
>         from incompatible pointer type
>
> The callback to dpms was pointing to a helper function which had a
> return type of void, whereas the callback should point to a function
> which has a return type of int.
> On closer look it turned out that we do not need the helper function
> since if we call drm_helper_connector_dpms() directly, the first check
> that drm_helper_connector_dpms() does is: if (mode == connector->dpms)
>
> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>

Looks good, thanks.

Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

> ---
>  drivers/gpu/drm/gma500/mdfld_dsi_output.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> index d758f4c..907cb51 100644
> --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> @@ -382,16 +382,6 @@ static int mdfld_dsi_connector_mode_valid(struct drm_connector *connector,
>         return MODE_OK;
>  }
>
> -static void mdfld_dsi_connector_dpms(struct drm_connector *connector, int mode)
> -{
> -       if (mode == connector->dpms)
> -               return;
> -
> -       /*first, execute dpms*/
> -
> -       drm_helper_connector_dpms(connector, mode);
> -}
> -
>  static struct drm_encoder *mdfld_dsi_connector_best_encoder(
>                                 struct drm_connector *connector)
>  {
> @@ -404,7 +394,7 @@ static struct drm_encoder *mdfld_dsi_connector_best_encoder(
>
>  /*DSI connector funcs*/
>  static const struct drm_connector_funcs mdfld_dsi_connector_funcs = {
> -       .dpms = /*drm_helper_connector_dpms*/mdfld_dsi_connector_dpms,
> +       .dpms = drm_helper_connector_dpms,
>         .detect = mdfld_dsi_connector_detect,
>         .fill_modes = drm_helper_probe_single_connector_modes,
>         .set_property = mdfld_dsi_connector_set_property,
> --
> 1.9.1
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/gma500: remove helper function
  2016-02-06 17:09   ` Patrik Jakobsson
@ 2016-02-08  9:03     ` Daniel Vetter
  -1 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2016-02-08  9:03 UTC (permalink / raw)
  To: Patrik Jakobsson
  Cc: Sudip Mukherjee, David Airlie, Daniel Vetter, linux-kernel, dri-devel

On Sat, Feb 06, 2016 at 06:09:13PM +0100, Patrik Jakobsson wrote:
> On Tue, Feb 2, 2016 at 7:05 AM, Sudip Mukherjee
> <sudipm.mukherjee@gmail.com> wrote:
> > We were getting build warning about:
> > drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:2: warning: initialization
> >         from incompatible pointer type
> >
> > The callback to dpms was pointing to a helper function which had a
> > return type of void, whereas the callback should point to a function
> > which has a return type of int.
> > On closer look it turned out that we do not need the helper function
> > since if we call drm_helper_connector_dpms() directly, the first check
> > that drm_helper_connector_dpms() does is: if (mode == connector->dpms)
> >
> > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> 
> Looks good, thanks.
> 
> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

Applied to drm-misc, thanks.
-Daniel

> 
> > ---
> >  drivers/gpu/drm/gma500/mdfld_dsi_output.c | 12 +-----------
> >  1 file changed, 1 insertion(+), 11 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> > index d758f4c..907cb51 100644
> > --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> > +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> > @@ -382,16 +382,6 @@ static int mdfld_dsi_connector_mode_valid(struct drm_connector *connector,
> >         return MODE_OK;
> >  }
> >
> > -static void mdfld_dsi_connector_dpms(struct drm_connector *connector, int mode)
> > -{
> > -       if (mode == connector->dpms)
> > -               return;
> > -
> > -       /*first, execute dpms*/
> > -
> > -       drm_helper_connector_dpms(connector, mode);
> > -}
> > -
> >  static struct drm_encoder *mdfld_dsi_connector_best_encoder(
> >                                 struct drm_connector *connector)
> >  {
> > @@ -404,7 +394,7 @@ static struct drm_encoder *mdfld_dsi_connector_best_encoder(
> >
> >  /*DSI connector funcs*/
> >  static const struct drm_connector_funcs mdfld_dsi_connector_funcs = {
> > -       .dpms = /*drm_helper_connector_dpms*/mdfld_dsi_connector_dpms,
> > +       .dpms = drm_helper_connector_dpms,
> >         .detect = mdfld_dsi_connector_detect,
> >         .fill_modes = drm_helper_probe_single_connector_modes,
> >         .set_property = mdfld_dsi_connector_set_property,
> > --
> > 1.9.1
> >

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: [PATCH] drm/gma500: remove helper function
@ 2016-02-08  9:03     ` Daniel Vetter
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2016-02-08  9:03 UTC (permalink / raw)
  To: Patrik Jakobsson; +Cc: Daniel Vetter, Sudip Mukherjee, dri-devel, linux-kernel

On Sat, Feb 06, 2016 at 06:09:13PM +0100, Patrik Jakobsson wrote:
> On Tue, Feb 2, 2016 at 7:05 AM, Sudip Mukherjee
> <sudipm.mukherjee@gmail.com> wrote:
> > We were getting build warning about:
> > drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:2: warning: initialization
> >         from incompatible pointer type
> >
> > The callback to dpms was pointing to a helper function which had a
> > return type of void, whereas the callback should point to a function
> > which has a return type of int.
> > On closer look it turned out that we do not need the helper function
> > since if we call drm_helper_connector_dpms() directly, the first check
> > that drm_helper_connector_dpms() does is: if (mode == connector->dpms)
> >
> > Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
> 
> Looks good, thanks.
> 
> Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>

Applied to drm-misc, thanks.
-Daniel

> 
> > ---
> >  drivers/gpu/drm/gma500/mdfld_dsi_output.c | 12 +-----------
> >  1 file changed, 1 insertion(+), 11 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> > index d758f4c..907cb51 100644
> > --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> > +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> > @@ -382,16 +382,6 @@ static int mdfld_dsi_connector_mode_valid(struct drm_connector *connector,
> >         return MODE_OK;
> >  }
> >
> > -static void mdfld_dsi_connector_dpms(struct drm_connector *connector, int mode)
> > -{
> > -       if (mode == connector->dpms)
> > -               return;
> > -
> > -       /*first, execute dpms*/
> > -
> > -       drm_helper_connector_dpms(connector, mode);
> > -}
> > -
> >  static struct drm_encoder *mdfld_dsi_connector_best_encoder(
> >                                 struct drm_connector *connector)
> >  {
> > @@ -404,7 +394,7 @@ static struct drm_encoder *mdfld_dsi_connector_best_encoder(
> >
> >  /*DSI connector funcs*/
> >  static const struct drm_connector_funcs mdfld_dsi_connector_funcs = {
> > -       .dpms = /*drm_helper_connector_dpms*/mdfld_dsi_connector_dpms,
> > +       .dpms = drm_helper_connector_dpms,
> >         .detect = mdfld_dsi_connector_detect,
> >         .fill_modes = drm_helper_probe_single_connector_modes,
> >         .set_property = mdfld_dsi_connector_set_property,
> > --
> > 1.9.1
> >

-- 
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] 6+ messages in thread

end of thread, other threads:[~2016-02-08  9:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-02  6:05 [PATCH] drm/gma500: remove helper function Sudip Mukherjee
2016-02-02  6:05 ` Sudip Mukherjee
2016-02-06 17:09 ` Patrik Jakobsson
2016-02-06 17:09   ` Patrik Jakobsson
2016-02-08  9:03   ` Daniel Vetter
2016-02-08  9:03     ` Daniel Vetter

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.