diff mbox

[Resend] of: fix a build error to f_graph_get_endpoint_by_regs function

Message ID 1435043204-23133-1-git-send-email-inki.dae@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

대인기/Tizen Platform Lab(SR)/삼성전자 June 23, 2015, 7:06 a.m. UTC
This patch fixes the below build error reported by Stephen,

     Stephen reported:
     After merging the drm-exynos tree, today's linux-next build (x86_64
     allmodconfig) failed like this:

     drivers/media/i2c/adv7604.o: In function `of_graph_get_endpoint_by_regs':
     adv7604.c:(.text+0x586c): multiple definition of `of_graph_get_endpoint_by_regs'
     drivers/media/i2c/adv7343.o:adv7343.c:(.text+0xa13): first defined here
     drivers/media/platform/soc_camera/atmel-isi.o: In function `of_graph_get_endpoint_by_regs':
     atmel-isi.c:(.text+0x1ec9): multiple definition of `of_graph_get_endpoint_by_regs'
     drivers/media/platform/soc_camera/soc_camera.o:soc_camera.c:(.text+0x2ce3): first defined here
     drivers/media/platform/soc_camera/rcar_vin.o: In function `of_graph_get_endpoint_by_regs':
     rcar_vin.c:(.text+0x307c): multiple definition of `of_graph_get_endpoint_by_regs'
     drivers/media/platform/soc_camera/soc_camera.o:soc_camera.c:(.text+0x2ce3): first defined here

     Caused by commit:
       a0f7001c18ca ("of: add helper for getting endpoint node of specific identifiers")

To fix the error, this patch declares of_graph_get_endpoint_by_regs function
with "static inline".

Signed-off-by: Inki Dae <inki.dae@samsung.com>
---
 include/linux/of_graph.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rob Herring June 23, 2015, 1:57 p.m. UTC | #1
On Tue, Jun 23, 2015 at 2:06 AM, Inki Dae <inki.dae@samsung.com> wrote:
> This patch fixes the below build error reported by Stephen,
>
>      Stephen reported:
>      After merging the drm-exynos tree, today's linux-next build (x86_64
>      allmodconfig) failed like this:
>
>      drivers/media/i2c/adv7604.o: In function `of_graph_get_endpoint_by_regs':
>      adv7604.c:(.text+0x586c): multiple definition of `of_graph_get_endpoint_by_regs'
>      drivers/media/i2c/adv7343.o:adv7343.c:(.text+0xa13): first defined here
>      drivers/media/platform/soc_camera/atmel-isi.o: In function `of_graph_get_endpoint_by_regs':
>      atmel-isi.c:(.text+0x1ec9): multiple definition of `of_graph_get_endpoint_by_regs'
>      drivers/media/platform/soc_camera/soc_camera.o:soc_camera.c:(.text+0x2ce3): first defined here
>      drivers/media/platform/soc_camera/rcar_vin.o: In function `of_graph_get_endpoint_by_regs':
>      rcar_vin.c:(.text+0x307c): multiple definition of `of_graph_get_endpoint_by_regs'
>      drivers/media/platform/soc_camera/soc_camera.o:soc_camera.c:(.text+0x2ce3): first defined here
>
>      Caused by commit:
>        a0f7001c18ca ("of: add helper for getting endpoint node of specific identifiers")
>
> To fix the error, this patch declares of_graph_get_endpoint_by_regs function
> with "static inline".
>
> Signed-off-by: Inki Dae <inki.dae@samsung.com>

Acked-by: Rob Herring <robh@kernel.org>

> ---
>  include/linux/of_graph.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/of_graph.h b/include/linux/of_graph.h
> index 1c1d5b9..f8bcd0e 100644
> --- a/include/linux/of_graph.h
> +++ b/include/linux/of_graph.h
> @@ -71,7 +71,7 @@ static inline struct device_node *of_graph_get_next_endpoint(
>         return NULL;
>  }
>
> -struct device_node *of_graph_get_endpoint_by_regs(
> +static inline struct device_node *of_graph_get_endpoint_by_regs(
>                 const struct device_node *parent, int port_reg, int reg)
>  {
>         return NULL;
> --
> 1.7.9.5
>
Stephen Rothwell June 23, 2015, 6:27 p.m. UTC | #2
Hi Dave,

On Tue, 23 Jun 2015 16:06:44 +0900 Inki Dae <inki.dae@samsung.com> wrote:
>
> This patch fixes the below build error reported by Stephen,
> 
>      Stephen reported:
>      After merging the drm-exynos tree, today's linux-next build (x86_64
>      allmodconfig) failed like this:
> 
>      drivers/media/i2c/adv7604.o: In function `of_graph_get_endpoint_by_regs':
>      adv7604.c:(.text+0x586c): multiple definition of `of_graph_get_endpoint_by_regs'
>      drivers/media/i2c/adv7343.o:adv7343.c:(.text+0xa13): first defined here
>      drivers/media/platform/soc_camera/atmel-isi.o: In function `of_graph_get_endpoint_by_regs':
>      atmel-isi.c:(.text+0x1ec9): multiple definition of `of_graph_get_endpoint_by_regs'
>      drivers/media/platform/soc_camera/soc_camera.o:soc_camera.c:(.text+0x2ce3): first defined here
>      drivers/media/platform/soc_camera/rcar_vin.o: In function `of_graph_get_endpoint_by_regs':
>      rcar_vin.c:(.text+0x307c): multiple definition of `of_graph_get_endpoint_by_regs'
>      drivers/media/platform/soc_camera/soc_camera.o:soc_camera.c:(.text+0x2ce3): first defined here
> 
>      Caused by commit:
>        a0f7001c18ca ("of: add helper for getting endpoint node of specific identifiers")
> 
> To fix the error, this patch declares of_graph_get_endpoint_by_regs function
> with "static inline".
> 
> Signed-off-by: Inki Dae <inki.dae@samsung.com>

In case it is not obvious, this is needed in the drm tree now.
However, you seem to have been sent a rebased version of the drm-exynos
tree and so the commit referred to above is commit 8ccd0d0ca041 in your
tree.  :-(

Inki, please clean up your tree now that Dave has merged a rebased
version of it (and please do *not* rebase your tree before asking Dave
to merge it in the future - or if you must do that, then also update
the branch that I include in linux-next first).
diff mbox

Patch

diff --git a/include/linux/of_graph.h b/include/linux/of_graph.h
index 1c1d5b9..f8bcd0e 100644
--- a/include/linux/of_graph.h
+++ b/include/linux/of_graph.h
@@ -71,7 +71,7 @@  static inline struct device_node *of_graph_get_next_endpoint(
 	return NULL;
 }
 
-struct device_node *of_graph_get_endpoint_by_regs(
+static inline struct device_node *of_graph_get_endpoint_by_regs(
 		const struct device_node *parent, int port_reg, int reg)
 {
 	return NULL;