Skip to contentSkip to conversation

xen-pcifront: don't use flush_scheduled_work()

PATCH In review Tejun Heo 2 participants 4 messages Jan 24, 2011

Subsystems (3)
lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 xen-pcifront: don't use flush_scheduled_work()

flush_scheduled_work() is scheduled for deprecation. Cancel ->op_work directly instead.

Cc Ryan Wilson <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Jan Beulich <[email protected]>
Cc Jesse Barnes <[email protected]>
---
 drivers/pci/xen-pcifront.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/pci/xen-pcifront.c +1 -2
Index: work/drivers/pci/xen-pcifront.c
===================================================================
@@ -733,8 +733,7 @@ static void free_pdev(struct pcifront_de
 
 	pcifront_free_roots(pdev);
 
-	/*For PCIE_AER error handling job*/
-	flush_scheduled_work();
+	cancel_work_sync(&pdev->op_work);
 
 	if (pdev->irq >= 0)
 		unbind_from_irqhandler(pdev->irq, pdev);
#1 lore raw
Quoted 1 line · Tejun Heo

flush_scheduled_work() is scheduled for deprecation. Cancel ->op_work

2.6.39 or 2.6.40? Not seeing it referenced in feature-removal-schedule.txt file?

Quoted 16 lines

directly instead.

Cc Ryan Wilson <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Jan Beulich <[email protected]>
Cc Jesse Barnes <[email protected]>
---
 drivers/pci/xen-pcifront.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Index: work/drivers/pci/xen-pcifront.c
===================================================================

drivers/pci/xen-pcifront.c static void free_pdev(struct pcifront_de · line 736

Quoted 4 lines
drivers/pci/xen-pcifront.c +0 -1
@@ -733,8 +733,7 @@ static void free_pdev(struct pcifront_de
 
 	pcifront_free_roots(pdev);
 
-	/*For PCIE_AER error handling job*/

Any reason for getting rid of the comment?

Quoted 9 lines
drivers/pci/xen-pcifront.c +1 -2
-	flush_scheduled_work();
+	cancel_work_sync(&pdev->op_work);
 
 	if (pdev->irq >= 0)
 		unbind_from_irqhandler(pdev->irq, pdev);
--

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

author
#2 lore raw

Hello,

Quoted 5 lines · Konrad Rzeszutek Wilk
Quoted 1 line · Tejun Heo

flush_scheduled_work() is scheduled for deprecation. Cancel ->op_work

2.6.39 or 2.6.40? Not seeing it referenced in
feature-removal-schedule.txt file?

There now are only a handful of users left. I'm currently sending out patches for them. Once they appear on linux-next, I'll mark flush_scheduled_work() deprecated and add it to feature-removal in the workqueue tree and push it to linux-next. So, yeah, it's likely to be marked deprecated in 2.6.39.

Thanks.

Signature · 1 line
tejun
author
#3 lore raw
In reply to Konrad Rzeszutek Wilk

Sorry, missed the later part.

Quoted 6 lines · Konrad Rzeszutek Wilk

drivers/pci/xen-pcifront.c static void free_pdev(struct pcifront_de · line 736

Quoted 1 line
drivers/pci/xen-pcifront.c +0 -1
-	/*For PCIE_AER error handling job*/

Any reason for getting rid of the comment?

drivers/pci/xen-pcifront.c static void free_pdev(struct pcifront_de · line 736

Quoted 2 lines
drivers/pci/xen-pcifront.c +1 -1
-	flush_scheduled_work();
+	cancel_work_sync(&pdev->op_work);

Because it's obvious from the code now. If you think it's better to keep the comment, I have no objection whatsoever.

Thank you.

Signature · 1 line
tejun