Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
Browse files Browse the repository at this point in the history
Pull IDE update from David Miller:
 "As usual, very quiet in this subsystem.

  Just a list_for_each_entry_safe() conversion"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
  drivers/ide: Fix build regression.
  drivers/ide: convert to list_for_each_entry_safe()
  • Loading branch information
Linus Torvalds committed Apr 7, 2020
2 parents 479a72c + 78a515f commit 498ff42
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/ide/ide-scan-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ static int __init ide_scan_pcidev(struct pci_dev *dev)
static int __init ide_scan_pcibus(void)
{
struct pci_dev *dev = NULL;
struct pci_driver *d;
struct list_head *l, *n;
struct pci_driver *d, *tmp;

pre_init = 0;
for_each_pci_dev(dev)
Expand All @@ -101,9 +100,8 @@ static int __init ide_scan_pcibus(void)
* are post init.
*/

list_for_each_safe(l, n, &ide_pci_drivers) {
list_del(l);
d = list_entry(l, struct pci_driver, node);
list_for_each_entry_safe(d, tmp, &ide_pci_drivers, node) {
list_del(&d->node);
if (__pci_register_driver(d, d->driver.owner,
d->driver.mod_name))
printk(KERN_ERR "%s: failed to register %s driver\n",
Expand Down

0 comments on commit 498ff42

Please sign in to comment.