All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: of: Fix linking when CONFIG_OF is not set
@ 2019-12-19 10:37 Laurent Pinchart
  2019-12-19 10:40 ` Fabrizio Castro
  2019-12-20 22:07 ` Chris Wilson
  0 siblings, 2 replies; 3+ messages in thread
From: Laurent Pinchart @ 2019-12-19 10:37 UTC (permalink / raw)
  To: dri-devel; +Cc: Fabrizio Castro

The new helper drm_of_lvds_get_dual_link_pixel_order() introduced in
commit 6529007522de has a fallback stub when CONFIG_OF is not set, but
the stub is declared in drm_of.h without a static inline. This causes
multiple definitions of the function to be linked when the CONFIG_OF
option isn't set. Fix it by making the stub static inline.

Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
This fixes a link error in drm-next. Daniel, Dave, would you like to
apply the patch directly ?

 include/drm/drm_of.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h
index 8ec7ca6d2369..b9b093add92e 100644
--- a/include/drm/drm_of.h
+++ b/include/drm/drm_of.h
@@ -92,8 +92,9 @@ static inline int drm_of_find_panel_or_bridge(const struct device_node *np,
 	return -EINVAL;
 }
 
-int drm_of_lvds_get_dual_link_pixel_order(const struct device_node *port1,
-					  const struct device_node *port2)
+static inline int
+drm_of_lvds_get_dual_link_pixel_order(const struct device_node *port1,
+				      const struct device_node *port2)
 {
 	return -EINVAL;
 }
-- 
Regards,

Laurent Pinchart

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

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

* RE: [PATCH] drm: of: Fix linking when CONFIG_OF is not set
  2019-12-19 10:37 [PATCH] drm: of: Fix linking when CONFIG_OF is not set Laurent Pinchart
@ 2019-12-19 10:40 ` Fabrizio Castro
  2019-12-20 22:07 ` Chris Wilson
  1 sibling, 0 replies; 3+ messages in thread
From: Fabrizio Castro @ 2019-12-19 10:40 UTC (permalink / raw)
  To: Laurent Pinchart, dri-devel; +Cc: Chris Paterson, Biju Das

Hi Laurent,

> From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Sent: 19 December 2019 10:37
> To: dri-devel@lists.freedesktop.org
> Cc: Fabrizio Castro <fabrizio.castro@bp.renesas.com>; Daniel Vetter <daniel@ffwll.ch>; Dave Airlie <airlied@gmail.com>
> Subject: [PATCH] drm: of: Fix linking when CONFIG_OF is not set
> 
> The new helper drm_of_lvds_get_dual_link_pixel_order() introduced in
> commit 6529007522de has a fallback stub when CONFIG_OF is not set, but
> the stub is declared in drm_of.h without a static inline. This causes
> multiple definitions of the function to be linked when the CONFIG_OF
> option isn't set. Fix it by making the stub static inline.
> 
> Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Thank you for fixing this, I came to the same conclusion, therefore

Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>

> ---
> This fixes a link error in drm-next. Daniel, Dave, would you like to
> apply the patch directly ?
> 
>  include/drm/drm_of.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h
> index 8ec7ca6d2369..b9b093add92e 100644
> --- a/include/drm/drm_of.h
> +++ b/include/drm/drm_of.h
> @@ -92,8 +92,9 @@ static inline int drm_of_find_panel_or_bridge(const struct device_node *np,
>  	return -EINVAL;
>  }
> 
> -int drm_of_lvds_get_dual_link_pixel_order(const struct device_node *port1,
> -					  const struct device_node *port2)
> +static inline int
> +drm_of_lvds_get_dual_link_pixel_order(const struct device_node *port1,
> +				      const struct device_node *port2)
>  {
>  	return -EINVAL;
>  }
> --
> 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] 3+ messages in thread

* Re: [PATCH] drm: of: Fix linking when CONFIG_OF is not set
  2019-12-19 10:37 [PATCH] drm: of: Fix linking when CONFIG_OF is not set Laurent Pinchart
  2019-12-19 10:40 ` Fabrizio Castro
@ 2019-12-20 22:07 ` Chris Wilson
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2019-12-20 22:07 UTC (permalink / raw)
  To: Laurent Pinchart, dri-devel; +Cc: Fabrizio Castro

Quoting Laurent Pinchart (2019-12-19 10:37:03)
> The new helper drm_of_lvds_get_dual_link_pixel_order() introduced in
> commit 6529007522de has a fallback stub when CONFIG_OF is not set, but
> the stub is declared in drm_of.h without a static inline. This causes
> multiple definitions of the function to be linked when the CONFIG_OF
> option isn't set. Fix it by making the stub static inline.
> 
> Fixes: 6529007522de ("drm: of: Add drm_of_lvds_get_dual_link_pixel_order")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-12-23  8:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-19 10:37 [PATCH] drm: of: Fix linking when CONFIG_OF is not set Laurent Pinchart
2019-12-19 10:40 ` Fabrizio Castro
2019-12-20 22:07 ` Chris Wilson

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.