WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 13/31] Fix uage of INIT_WORK.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 13/31] Fix uage of INIT_WORK.
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Thu, 5 Nov 2009 16:33:21 -0500
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Delivery-date: Thu, 05 Nov 2009 13:49:09 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1257456819-782-13-git-send-email-konrad.wilk@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1257456819-782-1-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-2-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-3-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-4-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-5-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-6-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-7-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-8-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-9-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-10-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-11-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-12-git-send-email-konrad.wilk@xxxxxxxxxx> <1257456819-782-13-git-send-email-konrad.wilk@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Modern kernels only require two arguments. Also update
the workqueue function with the right prototype.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
---
 drivers/xen/pcifront/pci_op.c   |    4 ++--
 drivers/xen/pcifront/pcifront.h |    2 +-
 drivers/xen/pcifront/xenbus.c   |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/xen/pcifront/pci_op.c b/drivers/xen/pcifront/pci_op.c
index 725732f..fd47951 100644
--- a/drivers/xen/pcifront/pci_op.c
+++ b/drivers/xen/pcifront/pci_op.c
@@ -640,9 +640,9 @@ static pci_ers_result_t pcifront_common_process( int cmd, 
struct pcifront_device
 }
 
 
-void pcifront_do_aer(void *data)
+void pcifront_do_aer(struct work_struct *data)
 {
-       struct pcifront_device *pdev = data;
+       struct pcifront_device *pdev = container_of(data, struct 
pcifront_device, op_work);
        int cmd = pdev->sh_info->aer_op.cmd;
        pci_channel_state_t state = 
                (pci_channel_state_t)pdev->sh_info->aer_op.err;
diff --git a/drivers/xen/pcifront/pcifront.h b/drivers/xen/pcifront/pcifront.h
index d67ae95..82364c4 100644
--- a/drivers/xen/pcifront/pcifront.h
+++ b/drivers/xen/pcifront/pcifront.h
@@ -48,7 +48,7 @@ int pcifront_rescan_root(struct pcifront_device *pdev,
                         unsigned int domain, unsigned int bus);
 void pcifront_free_roots(struct pcifront_device *pdev);
 
-void pcifront_do_aer( void *data);
+void pcifront_do_aer(struct work_struct *data);
 
 irqreturn_t pcifront_handler_aer(int irq, void *dev);
 
diff --git a/drivers/xen/pcifront/xenbus.c b/drivers/xen/pcifront/xenbus.c
index 5e54696..4f34f87 100644
--- a/drivers/xen/pcifront/xenbus.c
+++ b/drivers/xen/pcifront/xenbus.c
@@ -50,7 +50,7 @@ static struct pcifront_device *alloc_pdev(struct 
xenbus_device *xdev)
        pdev->evtchn = INVALID_EVTCHN;
        pdev->gnt_ref = INVALID_GRANT_REF;
 
-       INIT_WORK(&pdev->op_work, pcifront_do_aer, pdev);
+       INIT_WORK(&pdev->op_work, pcifront_do_aer);
 
        dev_dbg(&xdev->dev, "Allocated pdev @ 0x%p pdev->sh_info @ 0x%p\n",
                pdev, pdev->sh_info);
-- 
1.6.2.5


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>