Skip to contentSkip to conversation

PCI: hv: Use list_move_tail instead of list_del/list_add_tail

PATCH Applied Wei Yongjun 2 participants 2 messages Jul 28, 2016 – Aug 22, 2016 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: hv: Use list_move_tail instead of list_del/list_add_tail

Using list_move_tail() instead of list_del() + list_add_tail().

---
 drivers/pci/host/pci-hyperv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pci/host/pci-hyperv.c +1 -2
index 6955ffdb..a8deeca 100644
@@ -1466,8 +1466,7 @@ static void pci_devices_present_work(struct work_struct *work)
 			if (hpdev->reported_missing) {
 				found = true;
 				put_pcichild(hpdev, hv_pcidev_ref_childlist);
-				list_del(&hpdev->list_entry);
-				list_add_tail(&hpdev->list_entry, &removed);
+				list_move_tail(&hpdev->list_entry, &removed);
 				break;
 			}
 		}
#1 lore raw
Quoted 3 lines · Wei Yongjun

Using list_move_tail() instead of list_del() + list_add_tail().

Applied to pci/host-hv for v4.9, thanks!

Quoted 25 lines
---
 drivers/pci/host/pci-hyperv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pci/host/pci-hyperv.c +1 -3
index 6955ffdb..a8deeca 100644
@@ -1466,8 +1466,7 @@ static void pci_devices_present_work(struct work_struct *work)
 			if (hpdev->reported_missing) {
 				found = true;
 				put_pcichild(hpdev, hv_pcidev_ref_childlist);
-				list_del(&hpdev->list_entry);
-				list_add_tail(&hpdev->list_entry, &removed);
+				list_move_tail(&hpdev->list_entry, &removed);
 				break;
 			}
 		}
 
 
 
--

To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html