* Re: [PATCH v3, part1 07/10] PCI, unicore, m68k: remove redundant call of pci_bus_add_devices()
[not found] ` <1369489718-25869-8-git-send-email-jiang.liu@huawei.com>
@ 2013-06-05 21:31 ` Bjorn Helgaas
[not found] ` <CAErSpo7Lbu_MuxYGa6sghu7xuDJ9ZFN8pK0=xM0QMOwr=P2Y_Q@mail.gmail.com>
1 sibling, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2013-06-05 21:31 UTC (permalink / raw)
To: Jiang Liu
Cc: Yinghai Lu, Jiang Liu, Rafael J . Wysocki, Greg Kroah-Hartman,
Gu Zheng, Toshi Kani, Myron Stowe, Yijing Wang,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Geert Uytterhoeven, Greg Ungerer, linux-m68k, Guan Xuetao
[+cc m68k and unicore32 maintainers]
On Sat, May 25, 2013 at 7:48 AM, Jiang Liu <liuj97@gmail.com> wrote:
> pci_scan_bus() and pci_scan_root_bus() has called pci_bus_add_devices()
> once, so remove the redundant call of pci_bus_add_devices().
> On the other handle, subsys_init() callbacks will be invoked before
> device_init() callbacks, so it should be safe to remove the redundant
> calls.
>
> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
> ---
> arch/m68k/platform/coldfire/pci.c | 2 +-
> arch/unicore32/kernel/pci.c | 5 -----
> 2 files changed, 1 insertion(+), 6 deletions(-)
m68k and unicore32 guys:
I plan to apply the patch below. I actually split it into two, one
for m68k and another for unicore32. If you object or would rather
push it through your trees, let me know. I don't think the rest of
the series has any actual dependency on this, so there shouldn't be
any problem if you want to take it yourselves.
Bjorn
> diff --git a/arch/m68k/platform/coldfire/pci.c b/arch/m68k/platform/coldfire/pci.c
> index 8572246..2345972 100644
> --- a/arch/m68k/platform/coldfire/pci.c
> +++ b/arch/m68k/platform/coldfire/pci.c
> @@ -320,7 +320,7 @@ static int __init mcf_pci_init(void)
> pci_bus_size_bridges(rootbus);
> pci_bus_assign_resources(rootbus);
> pci_enable_bridges(rootbus);
> - pci_bus_add_devices(rootbus);
> +
> return 0;
> }
>
> diff --git a/arch/unicore32/kernel/pci.c b/arch/unicore32/kernel/pci.c
> index ef69c0c..374a055 100644
> --- a/arch/unicore32/kernel/pci.c
> +++ b/arch/unicore32/kernel/pci.c
> @@ -277,11 +277,6 @@ static int __init pci_common_init(void)
> pci_bus_assign_resources(puv3_bus);
> }
>
> - /*
> - * Tell drivers about devices found.
> - */
> - pci_bus_add_devices(puv3_bus);
> -
> return 0;
> }
> subsys_initcall(pci_common_init);
> --
> 1.8.1.2
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v3, part1 07/10] PCI, unicore, m68k: remove redundant call of pci_bus_add_devices()
[not found] ` <CAErSpo7Lbu_MuxYGa6sghu7xuDJ9ZFN8pK0=xM0QMOwr=P2Y_Q@mail.gmail.com>
@ 2013-06-06 6:54 ` Greg Ungerer
0 siblings, 0 replies; 2+ messages in thread
From: Greg Ungerer @ 2013-06-06 6:54 UTC (permalink / raw)
To: Bjorn Helgaas
Cc: Jiang Liu, Yinghai Lu, Jiang Liu, Rafael J . Wysocki,
Greg Kroah-Hartman, Gu Zheng, Toshi Kani, Myron Stowe,
Yijing Wang, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, Geert Uytterhoeven, linux-m68k,
Guan Xuetao
Hi Bjorn,
On 06/06/13 07:31, Bjorn Helgaas wrote:
> [+cc m68k and unicore32 maintainers]
>
> On Sat, May 25, 2013 at 7:48 AM, Jiang Liu <liuj97@gmail.com> wrote:
>> pci_scan_bus() and pci_scan_root_bus() has called pci_bus_add_devices()
>> once, so remove the redundant call of pci_bus_add_devices().
>> On the other handle, subsys_init() callbacks will be invoked before
>> device_init() callbacks, so it should be safe to remove the redundant
>> calls.
>>
>> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
>> ---
>> arch/m68k/platform/coldfire/pci.c | 2 +-
>> arch/unicore32/kernel/pci.c | 5 -----
>> 2 files changed, 1 insertion(+), 6 deletions(-)
>
> m68k and unicore32 guys:
>
> I plan to apply the patch below. I actually split it into two, one
> for m68k and another for unicore32. If you object or would rather
> push it through your trees, let me know. I don't think the rest of
> the series has any actual dependency on this, so there shouldn't be
> any problem if you want to take it yourselves.
I have no objection for m68k, feel free to push it through your tree.
I can't test the change in a board that has a PCI card in it right at
the moment, but otherwise:
Acked-by: Greg Ungerer <gerg@uclinux.org>
Regards
Greg
> Bjorn
>
>> diff --git a/arch/m68k/platform/coldfire/pci.c b/arch/m68k/platform/coldfire/pci.c
>> index 8572246..2345972 100644
>> --- a/arch/m68k/platform/coldfire/pci.c
>> +++ b/arch/m68k/platform/coldfire/pci.c
>> @@ -320,7 +320,7 @@ static int __init mcf_pci_init(void)
>> pci_bus_size_bridges(rootbus);
>> pci_bus_assign_resources(rootbus);
>> pci_enable_bridges(rootbus);
>> - pci_bus_add_devices(rootbus);
>> +
>> return 0;
>> }
>>
>> diff --git a/arch/unicore32/kernel/pci.c b/arch/unicore32/kernel/pci.c
>> index ef69c0c..374a055 100644
>> --- a/arch/unicore32/kernel/pci.c
>> +++ b/arch/unicore32/kernel/pci.c
>> @@ -277,11 +277,6 @@ static int __init pci_common_init(void)
>> pci_bus_assign_resources(puv3_bus);
>> }
>>
>> - /*
>> - * Tell drivers about devices found.
>> - */
>> - pci_bus_add_devices(puv3_bus);
>> -
>> return 0;
>> }
>> subsys_initcall(pci_common_init);
>> --
>> 1.8.1.2
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-06 6:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1369489718-25869-1-git-send-email-jiang.liu@huawei.com>
[not found] ` <1369489718-25869-8-git-send-email-jiang.liu@huawei.com>
2013-06-05 21:31 ` [PATCH v3, part1 07/10] PCI, unicore, m68k: remove redundant call of pci_bus_add_devices() Bjorn Helgaas
[not found] ` <CAErSpo7Lbu_MuxYGa6sghu7xuDJ9ZFN8pK0=xM0QMOwr=P2Y_Q@mail.gmail.com>
2013-06-06 6:54 ` Greg Ungerer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox