All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH] critical patch to fix pci-tree build bot failure
@ 2017-06-27  9:24 Ryder Lee
  2017-06-27  9:24 ` [PATCH] PCI: mediatek: change to use the new host bridge interface Ryder Lee
  2017-06-27 13:20 ` [RESEND PATCH] critical patch to fix pci-tree build bot failure Bjorn Helgaas
  0 siblings, 2 replies; 10+ messages in thread
From: Ryder Lee @ 2017-06-27  9:24 UTC (permalink / raw)
  To: Andrew Morton, Stephen Rothwell
  Cc: Bjorn Helgaas, linux-pci, linux-kernel, Ryder Lee

Hi Stephen and Andrew,

Could you help to apply this patch? Seems Bjorn didn't response it these days.

This patch(based on pci-next tree) will fix the following build bot failure:
>> On Mon, Jun 26, 2017 at 09:47:36AM +0100, Build bot for Mark Brown wrote:
>>
>> This build failure is still present in -next:
>>
>> >     arm-allmodconfig
>> > ../drivers/pci/host/pcie-mediatek.c:485:8: error: implicit 
>> > declaration of function 'pci_register_host_bridge' 
>> > [-Werror=implicit-function-declaration]
>>
>> and we're at -rc7 now.

This is because pci/host-mediatek is a seperate branch in pci-tree, but merge together without proper modifications(eg. some API changes).

Hi Bjorn,
I rewrote commit message. Please ignore my previous one, sorry for inconvenience.

Thanks a lot!

Ryder Lee (1):
  PCI: mediatek: change to use the new host bridge interface

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

-- 
1.9.1

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

* [PATCH] PCI: mediatek: change to use the new host bridge interface
  2017-06-27  9:24 [RESEND PATCH] critical patch to fix pci-tree build bot failure Ryder Lee
@ 2017-06-27  9:24 ` Ryder Lee
  2017-06-27 22:30   ` Bjorn Helgaas
  2017-06-27 13:20 ` [RESEND PATCH] critical patch to fix pci-tree build bot failure Bjorn Helgaas
  1 sibling, 1 reply; 10+ messages in thread
From: Ryder Lee @ 2017-06-27  9:24 UTC (permalink / raw)
  To: Andrew Morton, Stephen Rothwell
  Cc: Bjorn Helgaas, linux-pci, linux-kernel, Ryder Lee

With the introduction of pci_scan_root_bus_bridge() there is no need to
export pci_register_host_bridge() to other kernel subsystems other than the
PCI compilation unit that needs it.

Make pci_register_host_bridge() static to its compilation unit and convert
the existing drivers usage over to pci_scan_root_bus_bridge().

Also, when probing the PCI host controller driver, if an error occurs, the probe
function code does not free memory allocated for the struct pci_host_bridge
resulting in memory leakage.

This patch fixes them by using the methods that introduces by Lorenzo.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
 drivers/pci/host/pcie-mediatek.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c
index 3baafa8..514ef34 100644
--- a/drivers/pci/host/pcie-mediatek.c
+++ b/drivers/pci/host/pcie-mediatek.c
@@ -482,12 +482,10 @@ static int mtk_pcie_register_host(struct pci_host_bridge *host)
 	host->dev.parent = pcie->dev;
 	host->ops = &mtk_pcie_ops;
 
-	err = pci_register_host_bridge(host);
+	err = pci_scan_root_bus_bridge(host);
 	if (err < 0)
 		return err;
 
-	pci_scan_child_bus(host->bus);
-
 	pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
 	pci_bus_size_bridges(host->bus);
 	pci_bus_assign_resources(host->bus);
@@ -506,7 +504,7 @@ static int mtk_pcie_probe(struct platform_device *pdev)
 	struct pci_host_bridge *host;
 	int err;
 
-	host = pci_alloc_host_bridge(sizeof(*pcie));
+	host = devm_pci_alloc_host_bridge(&pdev->dev, sizeof(*pcie));
 	if (!host)
 		return -ENOMEM;
 
-- 
1.9.1

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

* Re: [RESEND PATCH] critical patch to fix pci-tree build bot failure
  2017-06-27  9:24 [RESEND PATCH] critical patch to fix pci-tree build bot failure Ryder Lee
  2017-06-27  9:24 ` [PATCH] PCI: mediatek: change to use the new host bridge interface Ryder Lee
@ 2017-06-27 13:20 ` Bjorn Helgaas
  2017-06-27 22:10   ` Stephen Rothwell
  1 sibling, 1 reply; 10+ messages in thread
From: Bjorn Helgaas @ 2017-06-27 13:20 UTC (permalink / raw)
  To: Ryder Lee
  Cc: Andrew Morton, Stephen Rothwell, Bjorn Helgaas, linux-pci, linux-kernel

On Tue, Jun 27, 2017 at 4:24 AM, Ryder Lee <ryder.lee@mediatek.com> wrote:
> Hi Stephen and Andrew,
>
> Could you help to apply this patch? Seems Bjorn didn't response it these days.

I'm not dead, but I was on vacation most of last week.  I'll resolve this today.

> This patch(based on pci-next tree) will fix the following build bot failure:
>>> On Mon, Jun 26, 2017 at 09:47:36AM +0100, Build bot for Mark Brown wrote:
>>>
>>> This build failure is still present in -next:
>>>
>>> >     arm-allmodconfig
>>> > ../drivers/pci/host/pcie-mediatek.c:485:8: error: implicit
>>> > declaration of function 'pci_register_host_bridge'
>>> > [-Werror=implicit-function-declaration]
>>>
>>> and we're at -rc7 now.
>
> This is because pci/host-mediatek is a seperate branch in pci-tree, but merge together without proper modifications(eg. some API changes).
>
> Hi Bjorn,
> I rewrote commit message. Please ignore my previous one, sorry for inconvenience.
>
> Thanks a lot!
>
> Ryder Lee (1):
>   PCI: mediatek: change to use the new host bridge interface
>
>  drivers/pci/host/pcie-mediatek.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> --
> 1.9.1
>

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

* Re: [RESEND PATCH] critical patch to fix pci-tree build bot failure
  2017-06-27 13:20 ` [RESEND PATCH] critical patch to fix pci-tree build bot failure Bjorn Helgaas
@ 2017-06-27 22:10   ` Stephen Rothwell
  2017-06-27 22:23     ` Bjorn Helgaas
  2017-06-28 20:43     ` Bjorn Helgaas
  0 siblings, 2 replies; 10+ messages in thread
From: Stephen Rothwell @ 2017-06-27 22:10 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: bjorn, Ryder Lee, Andrew Morton, Bjorn Helgaas, linux-pci, linux-kernel

Hi Bjorn,

On Tue, 27 Jun 2017 08:20:44 -0500 Bjorn Helgaas <bjorn.helgaas@gmail.com> wrote:
>
> On Tue, Jun 27, 2017 at 4:24 AM, Ryder Lee <ryder.lee@mediatek.com> wrote:
> > Hi Stephen and Andrew,
> >
> > Could you help to apply this patch? Seems Bjorn didn't response it these days.  
> 
> I'm not dead, but I was on vacation most of last week.  I'll resolve this today.

Should I just add this patch to linux-next today (if you don't get
around to it in the next hour or so)?

-- 
Cheers,
Stephen Rothwell

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

* Re: [RESEND PATCH] critical patch to fix pci-tree build bot failure
  2017-06-27 22:10   ` Stephen Rothwell
@ 2017-06-27 22:23     ` Bjorn Helgaas
  2017-06-28 20:43     ` Bjorn Helgaas
  1 sibling, 0 replies; 10+ messages in thread
From: Bjorn Helgaas @ 2017-06-27 22:23 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Bjorn Helgaas, bjorn, Ryder Lee, Andrew Morton, Bjorn Helgaas,
	linux-pci, linux-kernel

On Wed, Jun 28, 2017 at 08:10:26AM +1000, Stephen Rothwell wrote:
> Hi Bjorn,
> 
> On Tue, 27 Jun 2017 08:20:44 -0500 Bjorn Helgaas <bjorn.helgaas@gmail.com> wrote:
> >
> > On Tue, Jun 27, 2017 at 4:24 AM, Ryder Lee <ryder.lee@mediatek.com> wrote:
> > > Hi Stephen and Andrew,
> > >
> > > Could you help to apply this patch? Seems Bjorn didn't response it these days.  
> > 
> > I'm not dead, but I was on vacation most of last week.  I'll resolve this today.
> 
> Should I just add this patch to linux-next today (if you don't get
> around to it in the next hour or so)?

Sure, I think that would be OK.  Thanks!

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

* Re: [PATCH] PCI: mediatek: change to use the new host bridge interface
  2017-06-27  9:24 ` [PATCH] PCI: mediatek: change to use the new host bridge interface Ryder Lee
@ 2017-06-27 22:30   ` Bjorn Helgaas
  2017-06-27 23:20     ` Bjorn Helgaas
  0 siblings, 1 reply; 10+ messages in thread
From: Bjorn Helgaas @ 2017-06-27 22:30 UTC (permalink / raw)
  To: Ryder Lee
  Cc: Andrew Morton, Stephen Rothwell, Bjorn Helgaas, linux-pci, linux-kernel

On Tue, Jun 27, 2017 at 05:24:11PM +0800, Ryder Lee wrote:
> With the introduction of pci_scan_root_bus_bridge() there is no need to
> export pci_register_host_bridge() to other kernel subsystems other than the
> PCI compilation unit that needs it.
> 
> Make pci_register_host_bridge() static to its compilation unit and convert
> the existing drivers usage over to pci_scan_root_bus_bridge().
> 
> Also, when probing the PCI host controller driver, if an error occurs, the probe
> function code does not free memory allocated for the struct pci_host_bridge
> resulting in memory leakage.
> 
> This patch fixes them by using the methods that introduces by Lorenzo.
> 
> Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>

I rebased my pci/host-mediatek branch on top of pci/enumeration (which
contains the series from Lorenzo), and folded this into the initial
MediaTek driver commit.

This branch:

https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/host-mediatek&id=b6ca15d18881b784dc9efc5d81989be26ecd9fc8

should have all the MediaTek bits I know about.  Can you double-check
it, please?

If all goes well, I'll incorporate this into -next tomorrow.

> ---
>  drivers/pci/host/pcie-mediatek.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c
> index 3baafa8..514ef34 100644
> --- a/drivers/pci/host/pcie-mediatek.c
> +++ b/drivers/pci/host/pcie-mediatek.c
> @@ -482,12 +482,10 @@ static int mtk_pcie_register_host(struct pci_host_bridge *host)
>  	host->dev.parent = pcie->dev;
>  	host->ops = &mtk_pcie_ops;
>  
> -	err = pci_register_host_bridge(host);
> +	err = pci_scan_root_bus_bridge(host);
>  	if (err < 0)
>  		return err;
>  
> -	pci_scan_child_bus(host->bus);
> -
>  	pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
>  	pci_bus_size_bridges(host->bus);
>  	pci_bus_assign_resources(host->bus);
> @@ -506,7 +504,7 @@ static int mtk_pcie_probe(struct platform_device *pdev)
>  	struct pci_host_bridge *host;
>  	int err;
>  
> -	host = pci_alloc_host_bridge(sizeof(*pcie));
> +	host = devm_pci_alloc_host_bridge(&pdev->dev, sizeof(*pcie));
>  	if (!host)
>  		return -ENOMEM;
>  
> -- 
> 1.9.1
> 

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

* Re: [PATCH] PCI: mediatek: change to use the new host bridge interface
  2017-06-27 22:30   ` Bjorn Helgaas
@ 2017-06-27 23:20     ` Bjorn Helgaas
  2017-06-28  1:21       ` Ryder Lee
  0 siblings, 1 reply; 10+ messages in thread
From: Bjorn Helgaas @ 2017-06-27 23:20 UTC (permalink / raw)
  To: Ryder Lee
  Cc: Andrew Morton, Stephen Rothwell, Bjorn Helgaas, linux-pci, linux-kernel

On Tue, Jun 27, 2017 at 05:30:40PM -0500, Bjorn Helgaas wrote:
> On Tue, Jun 27, 2017 at 05:24:11PM +0800, Ryder Lee wrote:
> > With the introduction of pci_scan_root_bus_bridge() there is no need to
> > export pci_register_host_bridge() to other kernel subsystems other than the
> > PCI compilation unit that needs it.
> > 
> > Make pci_register_host_bridge() static to its compilation unit and convert
> > the existing drivers usage over to pci_scan_root_bus_bridge().
> > 
> > Also, when probing the PCI host controller driver, if an error occurs, the probe
> > function code does not free memory allocated for the struct pci_host_bridge
> > resulting in memory leakage.
> > 
> > This patch fixes them by using the methods that introduces by Lorenzo.
> > 
> > Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> 
> I rebased my pci/host-mediatek branch on top of pci/enumeration (which
> contains the series from Lorenzo), and folded this into the initial
> MediaTek driver commit.
> 
> This branch:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/host-mediatek&id=b6ca15d18881b784dc9efc5d81989be26ecd9fc8
> 
> should have all the MediaTek bits I know about.  Can you double-check
> it, please?

Sorry, that's wrong; I see your controller powerup stuff in patchwork, and
that's *not* included yet.

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

* Re: [PATCH] PCI: mediatek: change to use the new host bridge interface
  2017-06-27 23:20     ` Bjorn Helgaas
@ 2017-06-28  1:21       ` Ryder Lee
  0 siblings, 0 replies; 10+ messages in thread
From: Ryder Lee @ 2017-06-28  1:21 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Andrew Morton, Stephen Rothwell, Bjorn Helgaas, linux-pci, linux-kernel

On Tue, 2017-06-27 at 18:20 -0500, Bjorn Helgaas wrote:
> On Tue, Jun 27, 2017 at 05:30:40PM -0500, Bjorn Helgaas wrote:
> > On Tue, Jun 27, 2017 at 05:24:11PM +0800, Ryder Lee wrote:
> > > With the introduction of pci_scan_root_bus_bridge() there is no need to
> > > export pci_register_host_bridge() to other kernel subsystems other than the
> > > PCI compilation unit that needs it.
> > > 
> > > Make pci_register_host_bridge() static to its compilation unit and convert
> > > the existing drivers usage over to pci_scan_root_bus_bridge().
> > > 
> > > Also, when probing the PCI host controller driver, if an error occurs, the probe
> > > function code does not free memory allocated for the struct pci_host_bridge
> > > resulting in memory leakage.
> > > 
> > > This patch fixes them by using the methods that introduces by Lorenzo.
> > > 
> > > Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
> > 
> > I rebased my pci/host-mediatek branch on top of pci/enumeration (which
> > contains the series from Lorenzo), and folded this into the initial
> > MediaTek driver commit.
> > 
> > This branch:
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/host-mediatek&id=b6ca15d18881b784dc9efc5d81989be26ecd9fc8
> > 
> > should have all the MediaTek bits I know about.  Can you double-check
> > it, please?
> 
> Sorry, that's wrong; I see your controller powerup stuff in patchwork, and
> that's *not* included yet.

Yes, that should be folded into the initial commit if possible.
Thanks for your help!

Ryder

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

* Re: [RESEND PATCH] critical patch to fix pci-tree build bot failure
  2017-06-27 22:10   ` Stephen Rothwell
  2017-06-27 22:23     ` Bjorn Helgaas
@ 2017-06-28 20:43     ` Bjorn Helgaas
  2017-06-28 21:55       ` Stephen Rothwell
  1 sibling, 1 reply; 10+ messages in thread
From: Bjorn Helgaas @ 2017-06-28 20:43 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Bjorn Helgaas, bjorn, Ryder Lee, Andrew Morton, Bjorn Helgaas,
	linux-pci, linux-kernel

On Wed, Jun 28, 2017 at 08:10:26AM +1000, Stephen Rothwell wrote:
> Hi Bjorn,
> 
> On Tue, 27 Jun 2017 08:20:44 -0500 Bjorn Helgaas <bjorn.helgaas@gmail.com> wrote:
> >
> > On Tue, Jun 27, 2017 at 4:24 AM, Ryder Lee <ryder.lee@mediatek.com> wrote:
> > > Hi Stephen and Andrew,
> > >
> > > Could you help to apply this patch? Seems Bjorn didn't response it these days.  
> > 
> > I'm not dead, but I was on vacation most of last week.  I'll resolve this today.
> 
> Should I just add this patch to linux-next today (if you don't get
> around to it in the next hour or so)?

Just FYI, this should be fixed in my -next branch now, so you shouldn't
need to add the patch yourself, Stephen.

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

* Re: [RESEND PATCH] critical patch to fix pci-tree build bot failure
  2017-06-28 20:43     ` Bjorn Helgaas
@ 2017-06-28 21:55       ` Stephen Rothwell
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2017-06-28 21:55 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Bjorn Helgaas, bjorn, Ryder Lee, Andrew Morton, Bjorn Helgaas,
	linux-pci, linux-kernel

Hi Bjorn,

On Wed, 28 Jun 2017 15:43:17 -0500 Bjorn Helgaas <helgaas@kernel.org> wrote:
>
> On Wed, Jun 28, 2017 at 08:10:26AM +1000, Stephen Rothwell wrote:
> > Hi Bjorn,
> > 
> > On Tue, 27 Jun 2017 08:20:44 -0500 Bjorn Helgaas <bjorn.helgaas@gmail.com> wrote:  
> > >
> > > On Tue, Jun 27, 2017 at 4:24 AM, Ryder Lee <ryder.lee@mediatek.com> wrote:  
> > > > Hi Stephen and Andrew,
> > > >
> > > > Could you help to apply this patch? Seems Bjorn didn't response it these days.    
> > > 
> > > I'm not dead, but I was on vacation most of last week.  I'll resolve this today.  
> > 
> > Should I just add this patch to linux-next today (if you don't get
> > around to it in the next hour or so)?  
> 
> Just FYI, this should be fixed in my -next branch now, so you shouldn't
> need to add the patch yourself, Stephen.

Excellent, thanks.

-- 
Cheers,
Stephen Rothwell

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

end of thread, other threads:[~2017-06-28 21:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-27  9:24 [RESEND PATCH] critical patch to fix pci-tree build bot failure Ryder Lee
2017-06-27  9:24 ` [PATCH] PCI: mediatek: change to use the new host bridge interface Ryder Lee
2017-06-27 22:30   ` Bjorn Helgaas
2017-06-27 23:20     ` Bjorn Helgaas
2017-06-28  1:21       ` Ryder Lee
2017-06-27 13:20 ` [RESEND PATCH] critical patch to fix pci-tree build bot failure Bjorn Helgaas
2017-06-27 22:10   ` Stephen Rothwell
2017-06-27 22:23     ` Bjorn Helgaas
2017-06-28 20:43     ` Bjorn Helgaas
2017-06-28 21:55       ` Stephen Rothwell

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.