linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] PCI: exynos: Fix section mismatch warning
@ 2014-05-28  9:48 Sachin Kamat
  2014-05-29  6:08 ` Jingoo Han
  2014-05-29 22:19 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Sachin Kamat @ 2014-05-28  9:48 UTC (permalink / raw)
  To: linux-pci; +Cc: linux-samsung-soc, jg1.han, bhelgaas, sachin.kamat

add_pcie_port is called from probe which is annotated with __init.
add_pcie_port calls dw_pcie_host_init which is also annotated with
__init. Thus it makes sense to annotate add_pcie_port with __init
to avoid the following section mismatch warning:

WARNING: drivers/pci/built-in.o(.text.unlikely+0xf8): Section mismatch in reference from the function add_pcie_port() to the function .init.text:dw_pcie_host_init()
   The function add_pcie_port() references
   the function __init dw_pcie_host_init().
   This is often because add_pcie_port lacks a __init
   annotation or the annotation of dw_pcie_host_init is wrong.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/pci/host/pci-exynos.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/pci/host/pci-exynos.c b/drivers/pci/host/pci-exynos.c
index 3de6bfbbe8e9..3c1ff89829ec 100644
--- a/drivers/pci/host/pci-exynos.c
+++ b/drivers/pci/host/pci-exynos.c
@@ -511,7 +511,8 @@ static struct pcie_host_ops exynos_pcie_host_ops = {
 	.host_init = exynos_pcie_host_init,
 };
 
-static int add_pcie_port(struct pcie_port *pp, struct platform_device *pdev)
+static int __init add_pcie_port(struct pcie_port *pp,
+				struct platform_device *pdev)
 {
 	int ret;
 
-- 
1.7.9.5


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

* Re: [PATCH 1/1] PCI: exynos: Fix section mismatch warning
  2014-05-28  9:48 [PATCH 1/1] PCI: exynos: Fix section mismatch warning Sachin Kamat
@ 2014-05-29  6:08 ` Jingoo Han
  2014-05-29 22:19 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Jingoo Han @ 2014-05-29  6:08 UTC (permalink / raw)
  To: 'Sachin Kamat', linux-pci
  Cc: linux-samsung-soc, bhelgaas, 'Jingoo Han'

On Wednesday, May 28, 2014 6:49 PM, Sachin Kamat wrote:
> 
> add_pcie_port is called from probe which is annotated with __init.
> add_pcie_port calls dw_pcie_host_init which is also annotated with
> __init. Thus it makes sense to annotate add_pcie_port with __init
> to avoid the following section mismatch warning:
> 
> WARNING: drivers/pci/built-in.o(.text.unlikely+0xf8): Section mismatch in reference from the function
> add_pcie_port() to the function .init.text:dw_pcie_host_init()
>    The function add_pcie_port() references
>    the function __init dw_pcie_host_init().
>    This is often because add_pcie_port lacks a __init
>    annotation or the annotation of dw_pcie_host_init is wrong.
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Acked-by: Jingoo Han <jg1.han@samsung.com>

Best regards,
Jingoo Han

> ---
>  drivers/pci/host/pci-exynos.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/host/pci-exynos.c b/drivers/pci/host/pci-exynos.c
> index 3de6bfbbe8e9..3c1ff89829ec 100644
> --- a/drivers/pci/host/pci-exynos.c
> +++ b/drivers/pci/host/pci-exynos.c
> @@ -511,7 +511,8 @@ static struct pcie_host_ops exynos_pcie_host_ops = {
>  	.host_init = exynos_pcie_host_init,
>  };
> 
> -static int add_pcie_port(struct pcie_port *pp, struct platform_device *pdev)
> +static int __init add_pcie_port(struct pcie_port *pp,
> +				struct platform_device *pdev)
>  {
>  	int ret;
> 
> --
> 1.7.9.5


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

* Re: [PATCH 1/1] PCI: exynos: Fix section mismatch warning
  2014-05-28  9:48 [PATCH 1/1] PCI: exynos: Fix section mismatch warning Sachin Kamat
  2014-05-29  6:08 ` Jingoo Han
@ 2014-05-29 22:19 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2014-05-29 22:19 UTC (permalink / raw)
  To: Sachin Kamat; +Cc: linux-pci, linux-samsung-soc, jg1.han

On Wed, May 28, 2014 at 03:18:45PM +0530, Sachin Kamat wrote:
> add_pcie_port is called from probe which is annotated with __init.
> add_pcie_port calls dw_pcie_host_init which is also annotated with
> __init. Thus it makes sense to annotate add_pcie_port with __init
> to avoid the following section mismatch warning:
> 
> WARNING: drivers/pci/built-in.o(.text.unlikely+0xf8): Section mismatch in reference from the function add_pcie_port() to the function .init.text:dw_pcie_host_init()
>    The function add_pcie_port() references
>    the function __init dw_pcie_host_init().
>    This is often because add_pcie_port lacks a __init
>    annotation or the annotation of dw_pcie_host_init is wrong.
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Applied with Jingoo's ack to pci/host-exynos for v3.16, thanks!

> ---
>  drivers/pci/host/pci-exynos.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/host/pci-exynos.c b/drivers/pci/host/pci-exynos.c
> index 3de6bfbbe8e9..3c1ff89829ec 100644
> --- a/drivers/pci/host/pci-exynos.c
> +++ b/drivers/pci/host/pci-exynos.c
> @@ -511,7 +511,8 @@ static struct pcie_host_ops exynos_pcie_host_ops = {
>  	.host_init = exynos_pcie_host_init,
>  };
>  
> -static int add_pcie_port(struct pcie_port *pp, struct platform_device *pdev)
> +static int __init add_pcie_port(struct pcie_port *pp,
> +				struct platform_device *pdev)
>  {
>  	int ret;
>  
> -- 
> 1.7.9.5
> 

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

end of thread, other threads:[~2014-05-29 22:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-28  9:48 [PATCH 1/1] PCI: exynos: Fix section mismatch warning Sachin Kamat
2014-05-29  6:08 ` Jingoo Han
2014-05-29 22:19 ` Bjorn Helgaas

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).