linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: spear: Add __init annotation to spear13xx_add_pcie_port()
@ 2014-11-06  5:38 Jingoo Han
  2014-11-10  6:39 ` Viresh Kumar
  2014-11-13 16:48 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Jingoo Han @ 2014-11-06  5:38 UTC (permalink / raw)
  To: 'Bjorn Helgaas'
  Cc: linux-pci, 'Mohit Kumar', 'Viresh Kumar',
	'Pratyush Anand', 'Jingoo Han'

Add __init annotation to spear13xx_add_pcie_port(), because
the spear13xx_add_pcie_port() is called only by spear13xx_pcie_probe()
that was already marked as __init. Also, this patch fixes
section mismatch warning.

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

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
This patch is based on the submitted patch "[PATCH V2] PCI:
spear: Add spear13xx before add_pcie_port/pcie_initt".

 drivers/pci/host/pcie-spear13xx.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/host/pcie-spear13xx.c b/drivers/pci/host/pcie-spear13xx.c
index 63f869f..60f43cd 100644
--- a/drivers/pci/host/pcie-spear13xx.c
+++ b/drivers/pci/host/pcie-spear13xx.c
@@ -269,8 +269,8 @@ static struct pcie_host_ops spear13xx_pcie_host_ops = {
 	.host_init = spear13xx_pcie_host_init,
 };
 
-static int spear13xx_add_pcie_port(struct pcie_port *pp,
-				   struct platform_device *pdev)
+static int __init spear13xx_add_pcie_port(struct pcie_port *pp,
+					 struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	int ret;
-- 
1.7.9.5



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

* Re: [PATCH] PCI: spear: Add __init annotation to spear13xx_add_pcie_port()
  2014-11-06  5:38 [PATCH] PCI: spear: Add __init annotation to spear13xx_add_pcie_port() Jingoo Han
@ 2014-11-10  6:39 ` Viresh Kumar
  2014-11-13 16:48 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Viresh Kumar @ 2014-11-10  6:39 UTC (permalink / raw)
  To: Jingoo Han
  Cc: Bjorn Helgaas, linux-pci@vger.kernel.org, Mohit Kumar,
	Pratyush Anand

On 6 November 2014 11:08, Jingoo Han <jg1.han@samsung.com> wrote:
> Add __init annotation to spear13xx_add_pcie_port(), because
> the spear13xx_add_pcie_port() is called only by spear13xx_pcie_probe()
> that was already marked as __init. Also, this patch fixes
> section mismatch warning.
>
> WARNING: drivers/pci/host/built-in.o(.text.unlikely+0x94): Section mismatch in reference from the function spear13xx_add_pcie_port()
> to the function .init.text:dw_pcie_host_init()
> The function spear13xx_add_pcie_port() references
> the function __init dw_pcie_host_init().
> This is often because spear13xx_add_pcie_port lacks a __init
> annotation or the annotation of dw_pcie_host_init is wrong.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
> This patch is based on the submitted patch "[PATCH V2] PCI:
> spear: Add spear13xx before add_pcie_port/pcie_initt".
>
>  drivers/pci/host/pcie-spear13xx.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-spear13xx.c b/drivers/pci/host/pcie-spear13xx.c
> index 63f869f..60f43cd 100644
> --- a/drivers/pci/host/pcie-spear13xx.c
> +++ b/drivers/pci/host/pcie-spear13xx.c
> @@ -269,8 +269,8 @@ static struct pcie_host_ops spear13xx_pcie_host_ops = {
>         .host_init = spear13xx_pcie_host_init,
>  };
>
> -static int spear13xx_add_pcie_port(struct pcie_port *pp,
> -                                  struct platform_device *pdev)
> +static int __init spear13xx_add_pcie_port(struct pcie_port *pp,
> +                                        struct platform_device *pdev)
>  {
>         struct device *dev = &pdev->dev;
>         int ret;

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

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

* Re: [PATCH] PCI: spear: Add __init annotation to spear13xx_add_pcie_port()
  2014-11-06  5:38 [PATCH] PCI: spear: Add __init annotation to spear13xx_add_pcie_port() Jingoo Han
  2014-11-10  6:39 ` Viresh Kumar
@ 2014-11-13 16:48 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2014-11-13 16:48 UTC (permalink / raw)
  To: Jingoo Han
  Cc: linux-pci, 'Mohit Kumar', 'Viresh Kumar',
	'Pratyush Anand'

On Thu, Nov 06, 2014 at 02:38:18PM +0900, Jingoo Han wrote:
> Add __init annotation to spear13xx_add_pcie_port(), because
> the spear13xx_add_pcie_port() is called only by spear13xx_pcie_probe()
> that was already marked as __init. Also, this patch fixes
> section mismatch warning.
> 
> WARNING: drivers/pci/host/built-in.o(.text.unlikely+0x94): Section mismatch in reference from the function spear13xx_add_pcie_port()
> to the function .init.text:dw_pcie_host_init()
> The function spear13xx_add_pcie_port() references
> the function __init dw_pcie_host_init().
> This is often because spear13xx_add_pcie_port lacks a __init
> annotation or the annotation of dw_pcie_host_init is wrong.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied with Viresh's ack to pci/host-spear for v3.19, thanks!

> ---
> This patch is based on the submitted patch "[PATCH V2] PCI:
> spear: Add spear13xx before add_pcie_port/pcie_initt".
> 
>  drivers/pci/host/pcie-spear13xx.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/host/pcie-spear13xx.c b/drivers/pci/host/pcie-spear13xx.c
> index 63f869f..60f43cd 100644
> --- a/drivers/pci/host/pcie-spear13xx.c
> +++ b/drivers/pci/host/pcie-spear13xx.c
> @@ -269,8 +269,8 @@ static struct pcie_host_ops spear13xx_pcie_host_ops = {
>  	.host_init = spear13xx_pcie_host_init,
>  };
>  
> -static int spear13xx_add_pcie_port(struct pcie_port *pp,
> -				   struct platform_device *pdev)
> +static int __init spear13xx_add_pcie_port(struct pcie_port *pp,
> +					 struct platform_device *pdev)
>  {
>  	struct device *dev = &pdev->dev;
>  	int ret;
> -- 
> 1.7.9.5
> 
> 

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

end of thread, other threads:[~2014-11-13 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-06  5:38 [PATCH] PCI: spear: Add __init annotation to spear13xx_add_pcie_port() Jingoo Han
2014-11-10  6:39 ` Viresh Kumar
2014-11-13 16:48 ` 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).