linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/gma500: Make mdfld_dsi_connector_dpms() return a value
@ 2016-02-18 14:58 Daniel Wagner
  2016-02-25 14:09 ` Patrik Jakobsson
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Wagner @ 2016-02-18 14:58 UTC (permalink / raw)
  To: linux-kernel; +Cc: Patrik Jakobsson, dri-devel, Daniel Wagner

9a69a9ac20f7 ("drm: Make the connector dpms callback
return a value, v2.") wants mdfld_dsi_connector_dpms to return
a value.

This fixes also a new gcc 5.2 warning:

drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:39: warning: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .dpms = /*drm_helper_connector_dpms*/mdfld_dsi_connector_dpms,
                                       ^
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
---
 drivers/gpu/drm/gma500/mdfld_dsi_output.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
index d758f4c..407b9bb 100644
--- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c
+++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
@@ -382,14 +382,14 @@ 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)
+static int mdfld_dsi_connector_dpms(struct drm_connector *connector, int mode)
 {
 	if (mode == connector->dpms)
-		return;
+		return 0;
 
 	/*first, execute dpms*/
 
-	drm_helper_connector_dpms(connector, mode);
+	return drm_helper_connector_dpms(connector, mode);
 }
 
 static struct drm_encoder *mdfld_dsi_connector_best_encoder(
@@ -404,7 +404,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 = mdfld_dsi_connector_dpms,
 	.detect = mdfld_dsi_connector_detect,
 	.fill_modes = drm_helper_probe_single_connector_modes,
 	.set_property = mdfld_dsi_connector_set_property,
-- 
2.5.0

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

* Re: [PATCH] drm/gma500: Make mdfld_dsi_connector_dpms() return a value
  2016-02-18 14:58 [PATCH] drm/gma500: Make mdfld_dsi_connector_dpms() return a value Daniel Wagner
@ 2016-02-25 14:09 ` Patrik Jakobsson
  2016-03-05 12:42   ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Patrik Jakobsson @ 2016-02-25 14:09 UTC (permalink / raw)
  To: Daniel Wagner; +Cc: linux-kernel, dri-devel

Hi Daniel,

A patch to fix this is already merged into drm-misc:

commit db9b60400f9253c25ae639797df2d0ff7a35d9d8
Author: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Date:   Tue Feb 2 11:35:55 2016 +0530

    drm/gma500: remove helper function

    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>
    Link: http://patchwork.freedesktop.org/patch/msgid/1454393155-13142-1-git-send-email-sudipm.mukherjee@gmail.com
    Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
    Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Thanks
Patrik


On Thu, Feb 18, 2016 at 3:58 PM, Daniel Wagner
<daniel.wagner@bmw-carit.de> wrote:
> 9a69a9ac20f7 ("drm: Make the connector dpms callback
> return a value, v2.") wants mdfld_dsi_connector_dpms to return
> a value.
>
> This fixes also a new gcc 5.2 warning:
>
> drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:39: warning: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
>   .dpms = /*drm_helper_connector_dpms*/mdfld_dsi_connector_dpms,
>                                        ^
> Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
> ---
>  drivers/gpu/drm/gma500/mdfld_dsi_output.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_output.c b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> index d758f4c..407b9bb 100644
> --- a/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> +++ b/drivers/gpu/drm/gma500/mdfld_dsi_output.c
> @@ -382,14 +382,14 @@ 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)
> +static int mdfld_dsi_connector_dpms(struct drm_connector *connector, int mode)
>  {
>         if (mode == connector->dpms)
> -               return;
> +               return 0;
>
>         /*first, execute dpms*/
>
> -       drm_helper_connector_dpms(connector, mode);
> +       return drm_helper_connector_dpms(connector, mode);
>  }
>
>  static struct drm_encoder *mdfld_dsi_connector_best_encoder(
> @@ -404,7 +404,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 = mdfld_dsi_connector_dpms,
>         .detect = mdfld_dsi_connector_detect,
>         .fill_modes = drm_helper_probe_single_connector_modes,
>         .set_property = mdfld_dsi_connector_set_property,
> --
> 2.5.0

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

* Re: [PATCH] drm/gma500: Make mdfld_dsi_connector_dpms() return a value
  2016-02-25 14:09 ` Patrik Jakobsson
@ 2016-03-05 12:42   ` Ingo Molnar
  2016-03-05 13:54     ` Ingo Molnar
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2016-03-05 12:42 UTC (permalink / raw)
  To: Patrik Jakobsson; +Cc: Daniel Wagner, linux-kernel, dri-devel, Linus Torvalds


* Patrik Jakobsson <patrik.r.jakobsson@gmail.com> wrote:

> Hi Daniel,
> 
> A patch to fix this is already merged into drm-misc:
> 
> commit db9b60400f9253c25ae639797df2d0ff7a35d9d8
> Author: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> Date:   Tue Feb 2 11:35:55 2016 +0530
> 
>     drm/gma500: remove helper function
> 
>     We were getting build warning about:
>     drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:2: warning: initialization
>         from incompatible pointer type

This should really be in drm-fixes, as this bug is now triggering an upstream 
allyesconfig build failure:

 drivers/gpu/drm/gma500/mdfld_dsi_output.c:407:39: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]

as we have this in Makefile:

 # enforce correct pointer usage
 KBUILD_CFLAGS   += $(call cc-option,-Werror=incompatible-pointer-types)

Thanks,

	Ingo

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

* Re: [PATCH] drm/gma500: Make mdfld_dsi_connector_dpms() return a value
  2016-03-05 12:42   ` Ingo Molnar
@ 2016-03-05 13:54     ` Ingo Molnar
  2016-03-08  8:09       ` Daniel Wagner
  0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2016-03-05 13:54 UTC (permalink / raw)
  To: Patrik Jakobsson; +Cc: Daniel Wagner, linux-kernel, dri-devel, Linus Torvalds


* Ingo Molnar <mingo@kernel.org> wrote:

> as we have this in Makefile:
> 
>  # enforce correct pointer usage
>  KBUILD_CFLAGS   += $(call cc-option,-Werror=incompatible-pointer-types)

Sorry, never mind - this is a recent commit that is not upstream.

So there's no upstream build regression.

Thanks,

	Ingo

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

* Re: [PATCH] drm/gma500: Make mdfld_dsi_connector_dpms() return a value
  2016-03-05 13:54     ` Ingo Molnar
@ 2016-03-08  8:09       ` Daniel Wagner
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Wagner @ 2016-03-08  8:09 UTC (permalink / raw)
  To: Ingo Molnar, Patrik Jakobsson; +Cc: linux-kernel, dri-devel, Linus Torvalds

On 03/05/2016 02:54 PM, Ingo Molnar wrote:
> 
> * Ingo Molnar <mingo@kernel.org> wrote:
> 
>> as we have this in Makefile:
>>
>>  # enforce correct pointer usage
>>  KBUILD_CFLAGS   += $(call cc-option,-Werror=incompatible-pointer-types)
> 
> Sorry, never mind - this is a recent commit that is not upstream.
> 
> So there's no upstream build regression.

Sorry about that. I got it wrong and didn't sent the kbuild change via
the proper tree. Still learning.

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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-18 14:58 [PATCH] drm/gma500: Make mdfld_dsi_connector_dpms() return a value Daniel Wagner
2016-02-25 14:09 ` Patrik Jakobsson
2016-03-05 12:42   ` Ingo Molnar
2016-03-05 13:54     ` Ingo Molnar
2016-03-08  8:09       ` Daniel Wagner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).