lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE9FiQVg5xJka9V_Aim4yzmC3PL9cx8wReV12-nPacPJXff5ZA@mail.gmail.com>
Date:	Tue, 15 Jan 2013 18:41:18 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Yijing Wang <wangyijing@...wei.com>
Cc:	Bjorn Helgaas <bhelgaas@...gle.com>,
	"Rafael J. Wysocki" <rjw@...k.pl>, Len Brown <lenb@...nel.org>,
	Taku Izumi <izumi.taku@...fujitsu.com>,
	Jiang Liu <jiang.liu@...wei.com>, linux-pci@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org
Subject: Re: [PATCH v8 22/22] PCI: move device_add out of pci_bus_add_device()

On Tue, Jan 15, 2013 at 6:29 PM, Yijing Wang <wangyijing@...wei.com> wrote:
> On 2013/1/12 6:40, Yinghai Lu wrote:
>> Move out device registering out of pci_bus_add_devices, so we could
>> put new created pci devices in device tree early.
>>
>> new pci_bus_add_devices will do the device_attach work to load pci drivers
>> instead.
>>
>> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
>> ---
>>  drivers/pci/bus.c   |   47 +++--------------------------------------------
>>  drivers/pci/iov.c   |    7 -------
>>  drivers/pci/probe.c |   34 +++++++++++++++++++++++++++-------
>>  3 files changed, 30 insertions(+), 58 deletions(-)
>>
>> diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
>> index 1f5916a..0a55845 100644
>> --- a/drivers/pci/bus.c
>> +++ b/drivers/pci/bus.c
>> @@ -178,22 +178,9 @@ static void pci_bus_attach_device(struct pci_dev *dev)
>>   */
>>  int pci_bus_add_device(struct pci_dev *dev)
>>  {
>> -     int retval;
>> -
>> -     pci_fixup_device(pci_fixup_final, dev);
>> -
>> -     retval = pcibios_add_device(dev);
>> -     if (retval)
>> -             return retval;
>> -
>> -     retval = device_add(&dev->dev);
>> -     if (retval)
>> -             return retval;
>> -
>>       pci_bus_attach_device(dev);
>>       dev->is_added = 1;
>> -     pci_proc_attach_device(dev);
>> -     pci_create_sysfs_dev_files(dev);
>> +
>>       return 0;
>>  }
>
>
> Hi Yinghai,
>    Should change pci_bus_add_device() function to void return now? So some unnecessary ret check can remove.
>

yeah, maybe later. this patch is already some kind of big now.

also there is outside caller...

drivers/edac/i82875p_edac.c:            err = pci_bus_add_device(dev);
drivers/platform/x86/asus-wmi.c:                                if
(pci_bus_add_device(dev))
drivers/platform/x86/eeepc-laptop.c:                            if
(pci_bus_add_device(dev))

so let change that later.

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ