Skip to contentSkip to conversation

use DECLARE_COMPLETION_ONSTACK for non-constant completion

PATCH Applied Yong Zhang 4 participants 9 messages Dec 16, 2009 – Dec 19, 2009

Subsystems (5)
SCSI USB PowerPC Hardware monitoring +1 more subsystems
lore
Share & tools
lore

Yong Zhang

author
#0 lore raw

cover use DECLARE_COMPLETION_ONSTACK for non-constant completion

The _ONSTACK variant should be used for on-stack completion, otherwise it will break lockdep.

Yong Zhang (5):
aha152x: use DECLARE_COMPLETION_ONSTACK for non-constant completion
mISDN: use DECLARE_COMPLETION_ONSTACK for non-constant completion
USB: use DECLARE_COMPLETION_ONSTACK for non-constant completion
hwmon: use DECLARE_COMPLETION_ONSTACK for non-constant completion powerpc/iseries: use DECLARE_COMPLETION_ONSTACK for non-constant completion

 arch/powerpc/platforms/iseries/viopath.c |    2 +-
 drivers/hwmon/ams/ams-pmu.c              |    4 ++--
 drivers/isdn/mISDN/l1oip_core.c          |    2 +-
 drivers/scsi/aha152x.c                   |    2 +-
 drivers/usb/gadget/fsl_qe_udc.c          |    2 +-
 drivers/usb/gadget/fsl_udc_core.c        |    2 +-
 drivers/usb/gadget/langwell_udc.c        |    2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)
author
#1 lore raw

PATCH 1/5 powerpc/iseries: use DECLARE_COMPLETION_ONSTACK for non-constant completion

The _ONSTACK variant should be used for on-stack completion, otherwise it will break lockdep.

Cc Benjamin Herrenschmidt <[email protected]>
Cc Paul Mackerras <[email protected]>
---
 arch/powerpc/platforms/iseries/viopath.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/platforms/iseries/viopath.c +1 -1
index 49ff4dc..5aea94f 100644
@@ -116,7 +116,7 @@ static int proc_viopath_show(struct seq_file *m, void *v)
 	u16 vlanMap;
 	dma_addr_t handle;
 	HvLpEvent_Rc hvrc;
-	DECLARE_COMPLETION(done);
+	DECLARE_COMPLETION_ONSTACK(done);
 	struct device_node *node;
 	const char *sysid;
 
Signature · 1 line
1.6.3.3
author
#2 lore raw

PATCH 2/5 hwmon: use DECLARE_COMPLETION_ONSTACK for non-constant completion

The _ONSTACK variant should be used for on-stack completion, otherwise it will break lockdep.

Cc Stelian Pop <[email protected]>
Cc Michael Hanselmann <[email protected]>
---
 drivers/hwmon/ams/ams-pmu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/hwmon/ams/ams-pmu.c +2 -2
index fb18b3d..2016629 100644
@@ -52,7 +52,7 @@ static void ams_pmu_req_complete(struct adb_request *req)
 static void ams_pmu_set_register(u8 reg, u8 value)
 {
 	static struct adb_request req;
-	DECLARE_COMPLETION(req_complete);
+	DECLARE_COMPLETION_ONSTACK(req_complete);
 
 	req.arg = &req_complete;
 	if (pmu_request(&req, ams_pmu_req_complete, 4, ams_pmu_cmd, 0x00, reg, value))
@@ -65,7 +65,7 @@ static void ams_pmu_set_register(u8 reg, u8 value)
 static u8 ams_pmu_get_register(u8 reg)
 {
 	static struct adb_request req;
-	DECLARE_COMPLETION(req_complete);
+	DECLARE_COMPLETION_ONSTACK(req_complete);
 
 	req.arg = &req_complete;
 	if (pmu_request(&req, ams_pmu_req_complete, 3, ams_pmu_cmd, 0x01, reg))
Signature · 1 line
1.6.3.3
author
#3 lore raw

PATCH 3/5 USB: use DECLARE_COMPLETION_ONSTACK for non-constant completion

The _ONSTACK variant should be used for on-stack completion, otherwise it will break lockdep.

Cc Greg Kroah-Hartman <[email protected]>
Cc Anton Vorontsov <[email protected]>
Cc Kay Sievers <[email protected]>
Cc Li Yang <[email protected]>
Cc David Brownell <[email protected]>
---
 drivers/usb/gadget/fsl_qe_udc.c   |    2 +-
 drivers/usb/gadget/fsl_udc_core.c |    2 +-
 drivers/usb/gadget/langwell_udc.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/usb/gadget/fsl_qe_udc.c +1 -1
index 7881f12..5e9e921 100644
@@ -2694,7 +2694,7 @@ static int __devexit qe_udc_remove(struct of_device *ofdev)
 	struct qe_ep *ep;
 	unsigned int size;
 
-	DECLARE_COMPLETION(done);
+	DECLARE_COMPLETION_ONSTACK(done);
 
 	if (!udc_controller)
 		return -ENODEV;
drivers/usb/gadget/fsl_udc_core.c +1 -1
index fa3d142..e9e4de3 100644
@@ -2399,7 +2399,7 @@ static int __exit fsl_udc_remove(struct platform_device *pdev)
 {
 	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 
-	DECLARE_COMPLETION(done);
+	DECLARE_COMPLETION_ONSTACK(done);
 
 	if (!udc_controller)
 		return -ENODEV;
drivers/usb/gadget/langwell_udc.c +1 -1
index a391351..ddfe015 100644
@@ -2903,7 +2903,7 @@ static void langwell_udc_remove(struct pci_dev *pdev)
 {
 	struct langwell_udc	*dev = the_controller;
 
-	DECLARE_COMPLETION(done);
+	DECLARE_COMPLETION_ONSTACK(done);
 
 	BUG_ON(dev->driver);
 	DBG(dev, "---> %s()\n", __func__);
Signature · 1 line
1.6.3.3
author
#4 lore raw

PATCH 4/5 mISDN: use DECLARE_COMPLETION_ONSTACK for non-constant completion

The _ONSTACK variant should be used for on-stack completion, otherwise it will break lockdep.

Cc Karsten Keil <[email protected]>
Cc David S. Miller <[email protected]>
Cc Andreas Eversberg <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
---
 drivers/isdn/mISDN/l1oip_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/isdn/mISDN/l1oip_core.c +1 -1
index 7e5f30d..f1e8af5 100644
@@ -661,7 +661,7 @@ l1oip_socket_thread(void *data)
 	size_t recvbuf_size = 1500;
 	int recvlen;
 	struct socket *socket = NULL;
-	DECLARE_COMPLETION(wait);
+	DECLARE_COMPLETION_ONSTACK(wait);
 
 	/* allocate buffer memory */
 	recvbuf = kmalloc(recvbuf_size, GFP_KERNEL);
Signature · 1 line
1.6.3.3
author
#5 lore raw

PATCH 5/5 aha152x: use DECLARE_COMPLETION_ONSTACK for non-constant completion

The _ONSTACK variant should be used for on-stack completion, otherwise it will break lockdep.

Cc Juergen E. Fischer <[email protected]>
Cc James E.J. Bottomley <[email protected]>
---
 drivers/scsi/aha152x.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/aha152x.c +1 -1
index 1e5478a..44e43b5 100644
@@ -1143,7 +1143,7 @@ static int aha152x_abort(Scsi_Cmnd *SCpnt)
 static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
 {
 	struct Scsi_Host *shpnt = SCpnt->device->host;
-	DECLARE_COMPLETION(done);
+	DECLARE_COMPLETION_ONSTACK(done);
 	int ret, issued, disconnected;
 	unsigned char old_cmd_len = SCpnt->cmd_len;
 	unsigned long flags;
Signature · 1 line
1.6.3.3
Acked-by on v1 4/5
#6 lore raw

Re: [PATCH 4/5] mISDN: use DECLARE_COMPLETION_ONSTACK for non-constant completion

In reply to Yong Zhang

The _ONSTACK variant should be used for on-stack completion, otherwise it will break lockdep.

Cc David S. Miller <[email protected]>
Cc Andreas Eversberg <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>
---
 drivers/isdn/mISDN/l1oip_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/isdn/mISDN/l1oip_core.c +1 -1
index 7e5f30d..f1e8af5 100644
@@ -661,7 +661,7 @@ l1oip_socket_thread(void *data)
 	size_t recvbuf_size = 1500;
 	int recvlen;
 	struct socket *socket = NULL;
-	DECLARE_COMPLETION(wait);
+	DECLARE_COMPLETION_ONSTACK(wait);
 
 	/* allocate buffer memory */
 	recvbuf = kmalloc(recvbuf_size, GFP_KERNEL);
Reviewed-by on the v1 series
#8 lore raw
In reply to Yong Zhang
Quoted 9 lines · Yong Zhang

The _ONSTACK variant should be used for on-stack completion, otherwise it will break lockdep.

Yong Zhang (5):
aha152x: use DECLARE_COMPLETION_ONSTACK for non-constant completion
mISDN: use DECLARE_COMPLETION_ONSTACK for non-constant completion
USB: use DECLARE_COMPLETION_ONSTACK for non-constant completion
hwmon: use DECLARE_COMPLETION_ONSTACK for non-constant completion powerpc/iseries: use DECLARE_COMPLETION_ONSTACK for non-constant completion

These all look fine for me.

For lockdep stuff, you should Cc Peter, adding him into Cc...

Thanks.

Quoted 14 lines
arch/powerpc/platforms/iseries/viopath.c |    2 +-
drivers/hwmon/ams/ams-pmu.c              |    4 ++--
drivers/isdn/mISDN/l1oip_core.c          |    2 +-
drivers/scsi/aha152x.c                   |    2 +-
drivers/usb/gadget/fsl_qe_udc.c          |    2 +-
drivers/usb/gadget/fsl_udc_core.c        |    2 +-
drivers/usb/gadget/langwell_udc.c        |    2 +-
7 files changed, 8 insertions(+), 8 deletions(-)

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

Signature · 1 line
Live like a child, think like the god.