From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753205AbbAVRka (ORCPT ); Thu, 22 Jan 2015 12:40:30 -0500 Received: from down.free-electrons.com ([37.187.137.238]:45382 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752349AbbAVRk0 (ORCPT ); Thu, 22 Jan 2015 12:40:26 -0500 Date: Thu, 22 Jan 2015 18:40:00 +0100 From: Thomas Petazzoni To: Yijing Wang Cc: Bjorn Helgaas , Jiang Liu , , Yinghai Lu , , Marc Zyngier , , Russell King , , Thomas Gleixner , Benjamin Herrenschmidt , Rusty Russell , Tony Luck , , "David S. Miller" , "Guan Xuetao" , , , Liviu Dudau , "Arnd Bergmann" , Geert Uytterhoeven , Jason Cooper , Gregory =?UTF-8?B?Q2zDqW1lbnQ=?= , Lior Amsalem , Nadav Haklai Subject: Re: [PATCH v2 23/30] PCI/mvebu: Use pci_common_init_dev() to simplify code Message-ID: <20150122184000.63ba06bb@free-electrons.com> In-Reply-To: <1421800225-26230-24-git-send-email-wangyijing@huawei.com> References: <1421800225-26230-1-git-send-email-wangyijing@huawei.com> <1421800225-26230-24-git-send-email-wangyijing@huawei.com> Organization: Free Electrons X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dear Yijing Wang, On Wed, 21 Jan 2015 08:30:18 +0800, Yijing Wang wrote: > Mvebu_pcie_scan_bus() is not necessary, we could use > pci_common_init_dev() instead of pci_common_init(), > and pass the device pointer as the parent. Then > pci_scan_root_bus() will be called to scan the pci busses. > > Signed-off-by: Yijing Wang > CC: Thomas Petazzoni > CC: Jason Cooper While I'm fine with the change to pci_common_init_dev(), I am not so sure about the removal of mvebu_pcie_scan_bus(). I vaguely remember that we intentionally did not use the default function for a specific reason. Of course, this was a long time ago, and I don't remember the reason. I would have to take a bit of time to 1/ review the archives of the discussion surrounding the pcie-mvebu driver, and 2/ test your patch to validate it works fine on HW. Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from down.free-electrons.com ([37.187.137.238]:45382 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752349AbbAVRk0 (ORCPT ); Thu, 22 Jan 2015 12:40:26 -0500 Date: Thu, 22 Jan 2015 18:40:00 +0100 From: Thomas Petazzoni To: Yijing Wang Cc: Bjorn Helgaas , Jiang Liu , , Yinghai Lu , , Marc Zyngier , , Russell King , , Thomas Gleixner , Benjamin Herrenschmidt , Rusty Russell , Tony Luck , , "David S. Miller" , "Guan Xuetao" , , , Liviu Dudau , "Arnd Bergmann" , Geert Uytterhoeven , Jason Cooper , Gregory =?UTF-8?B?Q2zDqW1lbnQ=?= , Lior Amsalem , Nadav Haklai Subject: Re: [PATCH v2 23/30] PCI/mvebu: Use pci_common_init_dev() to simplify code Message-ID: <20150122184000.63ba06bb@free-electrons.com> In-Reply-To: <1421800225-26230-24-git-send-email-wangyijing@huawei.com> References: <1421800225-26230-1-git-send-email-wangyijing@huawei.com> <1421800225-26230-24-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-pci-owner@vger.kernel.org List-ID: Dear Yijing Wang, On Wed, 21 Jan 2015 08:30:18 +0800, Yijing Wang wrote: > Mvebu_pcie_scan_bus() is not necessary, we could use > pci_common_init_dev() instead of pci_common_init(), > and pass the device pointer as the parent. Then > pci_scan_root_bus() will be called to scan the pci busses. > > Signed-off-by: Yijing Wang > CC: Thomas Petazzoni > CC: Jason Cooper While I'm fine with the change to pci_common_init_dev(), I am not so sure about the removal of mvebu_pcie_scan_bus(). I vaguely remember that we intentionally did not use the default function for a specific reason. Of course, this was a long time ago, and I don't remember the reason. I would have to take a bit of time to 1/ review the archives of the discussion surrounding the pcie-mvebu driver, and 2/ test your patch to validate it works fine on HW. Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni) Date: Thu, 22 Jan 2015 18:40:00 +0100 Subject: [PATCH v2 23/30] PCI/mvebu: Use pci_common_init_dev() to simplify code In-Reply-To: <1421800225-26230-24-git-send-email-wangyijing@huawei.com> References: <1421800225-26230-1-git-send-email-wangyijing@huawei.com> <1421800225-26230-24-git-send-email-wangyijing@huawei.com> Message-ID: <20150122184000.63ba06bb@free-electrons.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Dear Yijing Wang, On Wed, 21 Jan 2015 08:30:18 +0800, Yijing Wang wrote: > Mvebu_pcie_scan_bus() is not necessary, we could use > pci_common_init_dev() instead of pci_common_init(), > and pass the device pointer as the parent. Then > pci_scan_root_bus() will be called to scan the pci busses. > > Signed-off-by: Yijing Wang > CC: Thomas Petazzoni > CC: Jason Cooper While I'm fine with the change to pci_common_init_dev(), I am not so sure about the removal of mvebu_pcie_scan_bus(). I vaguely remember that we intentionally did not use the default function for a specific reason. Of course, this was a long time ago, and I don't remember the reason. I would have to take a bit of time to 1/ review the archives of the discussion surrounding the pcie-mvebu driver, and 2/ test your patch to validate it works fine on HW. Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Thu, 22 Jan 2015 17:40:00 +0000 Subject: Re: [PATCH v2 23/30] PCI/mvebu: Use pci_common_init_dev() to simplify code Message-Id: <20150122184000.63ba06bb@free-electrons.com> List-Id: References: <1421800225-26230-1-git-send-email-wangyijing@huawei.com> <1421800225-26230-24-git-send-email-wangyijing@huawei.com> In-Reply-To: <1421800225-26230-24-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Yijing Wang Cc: Bjorn Helgaas , Jiang Liu , linux-pci@vger.kernel.org, Yinghai Lu , linux-kernel@vger.kernel.org, Marc Zyngier , linux-arm-kernel@lists.infradead.org, Russell King , x86@kernel.org, Thomas Gleixner , Benjamin Herrenschmidt , Rusty Russell , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , Guan Xuetao , linux-alpha@vger.kernel.org, linux-m68k@vger.kernel.org, Liviu Dudau , Arnd Bergmann , Geert Uytterhoeven , Jason Cooper , Gregory =?UTF-8?B?Q2zDqW1lbnQ=?= , Lior Amsalem , Nadav Haklai Dear Yijing Wang, On Wed, 21 Jan 2015 08:30:18 +0800, Yijing Wang wrote: > Mvebu_pcie_scan_bus() is not necessary, we could use > pci_common_init_dev() instead of pci_common_init(), > and pass the device pointer as the parent. Then > pci_scan_root_bus() will be called to scan the pci busses. > > Signed-off-by: Yijing Wang > CC: Thomas Petazzoni > CC: Jason Cooper While I'm fine with the change to pci_common_init_dev(), I am not so sure about the removal of mvebu_pcie_scan_bus(). I vaguely remember that we intentionally did not use the default function for a specific reason. Of course, this was a long time ago, and I don't remember the reason. I would have to take a bit of time to 1/ review the archives of the discussion surrounding the pcie-mvebu driver, and 2/ test your patch to validate it works fine on HW. Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Subject: Re: [PATCH v2 23/30] PCI/mvebu: Use pci_common_init_dev() to simplify code Date: Thu, 22 Jan 2015 18:40:00 +0100 Message-ID: <20150122184000.63ba06bb@free-electrons.com> References: <1421800225-26230-1-git-send-email-wangyijing@huawei.com> <1421800225-26230-24-git-send-email-wangyijing@huawei.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1421800225-26230-24-git-send-email-wangyijing@huawei.com> Sender: linux-ia64-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Yijing Wang Cc: Bjorn Helgaas , Jiang Liu , linux-pci@vger.kernel.org, Yinghai Lu , linux-kernel@vger.kernel.org, Marc Zyngier , linux-arm-kernel@lists.infradead.org, Russell King , x86@kernel.org, Thomas Gleixner , Benjamin Herrenschmidt , Rusty Russell , Tony Luck , linux-ia64@vger.kernel.org, "David S. Miller" , Guan Xuetao , linux-alpha@vger.kernel.org, linux-m68k@lists.linux-m68k.org, Liviu Dudau , Arnd Bergmann , Geert Uytterhoeven , Jason Cooper , Gregory =?UTF-8?B?Q2zDqW1lbnQ=?= , Lior Amsalem <> Dear Yijing Wang, On Wed, 21 Jan 2015 08:30:18 +0800, Yijing Wang wrote: > Mvebu_pcie_scan_bus() is not necessary, we could use > pci_common_init_dev() instead of pci_common_init(), > and pass the device pointer as the parent. Then > pci_scan_root_bus() will be called to scan the pci busses. > > Signed-off-by: Yijing Wang > CC: Thomas Petazzoni > CC: Jason Cooper While I'm fine with the change to pci_common_init_dev(), I am not so sure about the removal of mvebu_pcie_scan_bus(). I vaguely remember that we intentionally did not use the default function for a specific reason. Of course, this was a long time ago, and I don't remember the reason. I would have to take a bit of time to 1/ review the archives of the discussion surrounding the pcie-mvebu driver, and 2/ test your patch to validate it works fine on HW. Thanks! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com