diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2006-10-01 02:28:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 03:39:24 -0400 |
commit | 6e9a4738c9fadb7cbdcabc1e3b415159f3741ed9 (patch) | |
tree | 0e470bb8cd431d59698da5a6999ff35a347619a3 /drivers | |
parent | 397d6140e93156ecb9cafcd9be0db10ff3c12ab3 (diff) |
[PATCH] completions: lockdep annotate on stack completions
All on stack DECLARE_COMPLETIONs should be replaced by:
DECLARE_COMPLETION_ONSTACK
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/DAC960.c | 2 | ||||
-rw-r--r-- | drivers/block/cciss.c | 6 | ||||
-rw-r--r-- | drivers/block/cciss_scsi.c | 2 | ||||
-rw-r--r-- | drivers/block/paride/pd.c | 2 | ||||
-rw-r--r-- | drivers/block/pktcdvd.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/smu.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_smu_controls.c | 2 | ||||
-rw-r--r-- | drivers/macintosh/windfarm_smu_sensors.c | 2 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 2 | ||||
-rw-r--r-- | drivers/scsi/53c700.c | 2 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic79xx_osm.c | 4 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aic7xxx_osm.c | 2 | ||||
-rw-r--r-- | drivers/scsi/gdth.c | 4 | ||||
-rw-r--r-- | drivers/scsi/qla1280.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/inode.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/omap_udc.c | 2 |
17 files changed, 23 insertions, 23 deletions
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 2568640430fb..b3f639fbf220 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
@@ -770,7 +770,7 @@ static void DAC960_P_QueueCommand(DAC960_Command_T *Command) | |||
770 | static void DAC960_ExecuteCommand(DAC960_Command_T *Command) | 770 | static void DAC960_ExecuteCommand(DAC960_Command_T *Command) |
771 | { | 771 | { |
772 | DAC960_Controller_T *Controller = Command->Controller; | 772 | DAC960_Controller_T *Controller = Command->Controller; |
773 | DECLARE_COMPLETION(Completion); | 773 | DECLARE_COMPLETION_ONSTACK(Completion); |
774 | unsigned long flags; | 774 | unsigned long flags; |
775 | Command->Completion = &Completion; | 775 | Command->Completion = &Completion; |
776 | 776 | ||
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index d2d45eaf3681..99f87efe0f58 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -879,7 +879,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep, | |||
879 | char *buff = NULL; | 879 | char *buff = NULL; |
880 | u64bit temp64; | 880 | u64bit temp64; |
881 | unsigned long flags; | 881 | unsigned long flags; |
882 | DECLARE_COMPLETION(wait); | 882 | DECLARE_COMPLETION_ONSTACK(wait); |
883 | 883 | ||
884 | if (!arg) | 884 | if (!arg) |
885 | return -EINVAL; | 885 | return -EINVAL; |
@@ -997,7 +997,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep, | |||
997 | BYTE sg_used = 0; | 997 | BYTE sg_used = 0; |
998 | int status = 0; | 998 | int status = 0; |
999 | int i; | 999 | int i; |
1000 | DECLARE_COMPLETION(wait); | 1000 | DECLARE_COMPLETION_ONSTACK(wait); |
1001 | __u32 left; | 1001 | __u32 left; |
1002 | __u32 sz; | 1002 | __u32 sz; |
1003 | BYTE __user *data_ptr; | 1003 | BYTE __user *data_ptr; |
@@ -1816,7 +1816,7 @@ static int sendcmd_withirq(__u8 cmd, | |||
1816 | u64bit buff_dma_handle; | 1816 | u64bit buff_dma_handle; |
1817 | unsigned long flags; | 1817 | unsigned long flags; |
1818 | int return_status; | 1818 | int return_status; |
1819 | DECLARE_COMPLETION(wait); | 1819 | DECLARE_COMPLETION_ONSTACK(wait); |
1820 | 1820 | ||
1821 | if ((c = cmd_alloc(h, 0)) == NULL) | 1821 | if ((c = cmd_alloc(h, 0)) == NULL) |
1822 | return -ENOMEM; | 1822 | return -ENOMEM; |
diff --git a/drivers/block/cciss_scsi.c b/drivers/block/cciss_scsi.c index 05f79d7393f7..bb15051ffbe0 100644 --- a/drivers/block/cciss_scsi.c +++ b/drivers/block/cciss_scsi.c | |||
@@ -766,7 +766,7 @@ cciss_scsi_do_simple_cmd(ctlr_info_t *c, | |||
766 | int direction) | 766 | int direction) |
767 | { | 767 | { |
768 | unsigned long flags; | 768 | unsigned long flags; |
769 | DECLARE_COMPLETION(wait); | 769 | DECLARE_COMPLETION_ONSTACK(wait); |
770 | 770 | ||
771 | cp->cmd_type = CMD_IOCTL_PEND; // treat this like an ioctl | 771 | cp->cmd_type = CMD_IOCTL_PEND; // treat this like an ioctl |
772 | cp->scsi_cmd = NULL; | 772 | cp->scsi_cmd = NULL; |
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index 38578b9dbfd1..40a11e567970 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride/pd.c | |||
@@ -713,7 +713,7 @@ static void do_pd_request(request_queue_t * q) | |||
713 | static int pd_special_command(struct pd_unit *disk, | 713 | static int pd_special_command(struct pd_unit *disk, |
714 | enum action (*func)(struct pd_unit *disk)) | 714 | enum action (*func)(struct pd_unit *disk)) |
715 | { | 715 | { |
716 | DECLARE_COMPLETION(wait); | 716 | DECLARE_COMPLETION_ONSTACK(wait); |
717 | struct request rq; | 717 | struct request rq; |
718 | int err = 0; | 718 | int err = 0; |
719 | 719 | ||
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 888d1aceeeff..a6b2aa67c9b2 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -348,7 +348,7 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command * | |||
348 | char sense[SCSI_SENSE_BUFFERSIZE]; | 348 | char sense[SCSI_SENSE_BUFFERSIZE]; |
349 | request_queue_t *q; | 349 | request_queue_t *q; |
350 | struct request *rq; | 350 | struct request *rq; |
351 | DECLARE_COMPLETION(wait); | 351 | DECLARE_COMPLETION_ONSTACK(wait); |
352 | int err = 0; | 352 | int err = 0; |
353 | 353 | ||
354 | q = bdev_get_queue(pd->bdev); | 354 | q = bdev_get_queue(pd->bdev); |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 2ebc3760f261..e2f4bb549063 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -2764,7 +2764,7 @@ static void idetape_add_stage_tail (ide_drive_t *drive,idetape_stage_t *stage) | |||
2764 | */ | 2764 | */ |
2765 | static void idetape_wait_for_request (ide_drive_t *drive, struct request *rq) | 2765 | static void idetape_wait_for_request (ide_drive_t *drive, struct request *rq) |
2766 | { | 2766 | { |
2767 | DECLARE_COMPLETION(wait); | 2767 | DECLARE_COMPLETION_ONSTACK(wait); |
2768 | idetape_tape_t *tape = drive->driver_data; | 2768 | idetape_tape_t *tape = drive->driver_data; |
2769 | 2769 | ||
2770 | #if IDETAPE_DEBUG_BUGS | 2770 | #if IDETAPE_DEBUG_BUGS |
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index 090e40fc5013..c0f9d82e4662 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
@@ -870,7 +870,7 @@ int smu_queue_i2c(struct smu_i2c_cmd *cmd) | |||
870 | 870 | ||
871 | static int smu_read_datablock(u8 *dest, unsigned int addr, unsigned int len) | 871 | static int smu_read_datablock(u8 *dest, unsigned int addr, unsigned int len) |
872 | { | 872 | { |
873 | DECLARE_COMPLETION(comp); | 873 | DECLARE_COMPLETION_ONSTACK(comp); |
874 | unsigned int chunk; | 874 | unsigned int chunk; |
875 | struct smu_cmd cmd; | 875 | struct smu_cmd cmd; |
876 | int rc; | 876 | int rc; |
@@ -917,7 +917,7 @@ static int smu_read_datablock(u8 *dest, unsigned int addr, unsigned int len) | |||
917 | 917 | ||
918 | static struct smu_sdbp_header *smu_create_sdb_partition(int id) | 918 | static struct smu_sdbp_header *smu_create_sdb_partition(int id) |
919 | { | 919 | { |
920 | DECLARE_COMPLETION(comp); | 920 | DECLARE_COMPLETION_ONSTACK(comp); |
921 | struct smu_simple_cmd cmd; | 921 | struct smu_simple_cmd cmd; |
922 | unsigned int addr, len, tlen; | 922 | unsigned int addr, len, tlen; |
923 | struct smu_sdbp_header *hdr; | 923 | struct smu_sdbp_header *hdr; |
diff --git a/drivers/macintosh/windfarm_smu_controls.c b/drivers/macintosh/windfarm_smu_controls.c index bff1f372f188..31b750d61206 100644 --- a/drivers/macintosh/windfarm_smu_controls.c +++ b/drivers/macintosh/windfarm_smu_controls.c | |||
@@ -56,7 +56,7 @@ static int smu_set_fan(int pwm, u8 id, u16 value) | |||
56 | { | 56 | { |
57 | struct smu_cmd cmd; | 57 | struct smu_cmd cmd; |
58 | u8 buffer[16]; | 58 | u8 buffer[16]; |
59 | DECLARE_COMPLETION(comp); | 59 | DECLARE_COMPLETION_ONSTACK(comp); |
60 | int rc; | 60 | int rc; |
61 | 61 | ||
62 | /* Fill SMU command structure */ | 62 | /* Fill SMU command structure */ |
diff --git a/drivers/macintosh/windfarm_smu_sensors.c b/drivers/macintosh/windfarm_smu_sensors.c index defe9922ebd1..01b4c50143dd 100644 --- a/drivers/macintosh/windfarm_smu_sensors.c +++ b/drivers/macintosh/windfarm_smu_sensors.c | |||
@@ -67,7 +67,7 @@ static void smu_ads_release(struct wf_sensor *sr) | |||
67 | static int smu_read_adc(u8 id, s32 *value) | 67 | static int smu_read_adc(u8 id, s32 *value) |
68 | { | 68 | { |
69 | struct smu_simple_cmd cmd; | 69 | struct smu_simple_cmd cmd; |
70 | DECLARE_COMPLETION(comp); | 70 | DECLARE_COMPLETION_ONSTACK(comp); |
71 | int rc; | 71 | int rc; |
72 | 72 | ||
73 | rc = smu_queue_simple(&cmd, SMU_CMD_READ_ADC, 1, | 73 | rc = smu_queue_simple(&cmd, SMU_CMD_READ_ADC, 1, |
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 7cafa34e4c7f..4d2bc7981324 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -301,7 +301,7 @@ zfcp_scsi_command_sync(struct zfcp_unit *unit, struct scsi_cmnd *scpnt, | |||
301 | int use_timer) | 301 | int use_timer) |
302 | { | 302 | { |
303 | int ret; | 303 | int ret; |
304 | DECLARE_COMPLETION(wait); | 304 | DECLARE_COMPLETION_ONSTACK(wait); |
305 | 305 | ||
306 | scpnt->SCp.ptr = (void *) &wait; /* silent re-use */ | 306 | scpnt->SCp.ptr = (void *) &wait; /* silent re-use */ |
307 | scpnt->scsi_done = zfcp_scsi_command_sync_handler; | 307 | scpnt->scsi_done = zfcp_scsi_command_sync_handler; |
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 657a3ab75399..15ce40a7053a 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c | |||
@@ -1939,7 +1939,7 @@ NCR_700_abort(struct scsi_cmnd * SCp) | |||
1939 | STATIC int | 1939 | STATIC int |
1940 | NCR_700_bus_reset(struct scsi_cmnd * SCp) | 1940 | NCR_700_bus_reset(struct scsi_cmnd * SCp) |
1941 | { | 1941 | { |
1942 | DECLARE_COMPLETION(complete); | 1942 | DECLARE_COMPLETION_ONSTACK(complete); |
1943 | struct NCR_700_Host_Parameters *hostdata = | 1943 | struct NCR_700_Host_Parameters *hostdata = |
1944 | (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; | 1944 | (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0]; |
1945 | 1945 | ||
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.c b/drivers/scsi/aic7xxx/aic79xx_osm.c index c7eeaced324a..1faa008b5b81 100644 --- a/drivers/scsi/aic7xxx/aic79xx_osm.c +++ b/drivers/scsi/aic7xxx/aic79xx_osm.c | |||
@@ -646,7 +646,7 @@ ahd_linux_dev_reset(struct scsi_cmnd *cmd) | |||
646 | struct ahd_initiator_tinfo *tinfo; | 646 | struct ahd_initiator_tinfo *tinfo; |
647 | struct ahd_tmode_tstate *tstate; | 647 | struct ahd_tmode_tstate *tstate; |
648 | unsigned long flags; | 648 | unsigned long flags; |
649 | DECLARE_COMPLETION(done); | 649 | DECLARE_COMPLETION_ONSTACK(done); |
650 | 650 | ||
651 | reset_scb = NULL; | 651 | reset_scb = NULL; |
652 | paused = FALSE; | 652 | paused = FALSE; |
@@ -2251,7 +2251,7 @@ done: | |||
2251 | if (paused) | 2251 | if (paused) |
2252 | ahd_unpause(ahd); | 2252 | ahd_unpause(ahd); |
2253 | if (wait) { | 2253 | if (wait) { |
2254 | DECLARE_COMPLETION(done); | 2254 | DECLARE_COMPLETION_ONSTACK(done); |
2255 | 2255 | ||
2256 | ahd->platform_data->eh_done = &done; | 2256 | ahd->platform_data->eh_done = &done; |
2257 | ahd_unlock(ahd, &flags); | 2257 | ahd_unlock(ahd, &flags); |
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.c b/drivers/scsi/aic7xxx/aic7xxx_osm.c index 64c8b88a429f..339b85cb61cd 100644 --- a/drivers/scsi/aic7xxx/aic7xxx_osm.c +++ b/drivers/scsi/aic7xxx/aic7xxx_osm.c | |||
@@ -2335,7 +2335,7 @@ done: | |||
2335 | if (paused) | 2335 | if (paused) |
2336 | ahc_unpause(ahc); | 2336 | ahc_unpause(ahc); |
2337 | if (wait) { | 2337 | if (wait) { |
2338 | DECLARE_COMPLETION(done); | 2338 | DECLARE_COMPLETION_ONSTACK(done); |
2339 | 2339 | ||
2340 | ahc->platform_data->eh_done = &done; | 2340 | ahc->platform_data->eh_done = &done; |
2341 | ahc_unlock(ahc, &flags); | 2341 | ahc_unlock(ahc, &flags); |
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index 43afd476e606..0f3eb22b979a 100644 --- a/drivers/scsi/gdth.c +++ b/drivers/scsi/gdth.c | |||
@@ -724,7 +724,7 @@ int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd, | |||
724 | int timeout, u32 *info) | 724 | int timeout, u32 *info) |
725 | { | 725 | { |
726 | Scsi_Cmnd *scp; | 726 | Scsi_Cmnd *scp; |
727 | DECLARE_COMPLETION(wait); | 727 | DECLARE_COMPLETION_ONSTACK(wait); |
728 | int rval; | 728 | int rval; |
729 | 729 | ||
730 | scp = kmalloc(sizeof(*scp), GFP_KERNEL); | 730 | scp = kmalloc(sizeof(*scp), GFP_KERNEL); |
@@ -764,7 +764,7 @@ int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd, | |||
764 | { | 764 | { |
765 | Scsi_Cmnd *scp = scsi_allocate_device(sdev, 1, FALSE); | 765 | Scsi_Cmnd *scp = scsi_allocate_device(sdev, 1, FALSE); |
766 | unsigned bufflen = gdtcmd ? sizeof(gdth_cmd_str) : 0; | 766 | unsigned bufflen = gdtcmd ? sizeof(gdth_cmd_str) : 0; |
767 | DECLARE_COMPLETION(wait); | 767 | DECLARE_COMPLETION_ONSTACK(wait); |
768 | int rval; | 768 | int rval; |
769 | 769 | ||
770 | if (!scp) | 770 | if (!scp) |
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 8953991462d7..332151e2a018 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c | |||
@@ -813,7 +813,7 @@ qla1280_error_action(struct scsi_cmnd *cmd, enum action action) | |||
813 | uint16_t data; | 813 | uint16_t data; |
814 | unsigned char *handle; | 814 | unsigned char *handle; |
815 | int result, i; | 815 | int result, i; |
816 | DECLARE_COMPLETION(wait); | 816 | DECLARE_COMPLETION_ONSTACK(wait); |
817 | struct timer_list timer; | 817 | struct timer_list timer; |
818 | 818 | ||
819 | ha = (struct scsi_qla_host *)(CMD_HOST(cmd)->hostdata); | 819 | ha = (struct scsi_qla_host *)(CMD_HOST(cmd)->hostdata); |
@@ -2406,7 +2406,7 @@ qla1280_mailbox_command(struct scsi_qla_host *ha, uint8_t mr, uint16_t *mb) | |||
2406 | uint16_t *optr, *iptr; | 2406 | uint16_t *optr, *iptr; |
2407 | uint16_t __iomem *mptr; | 2407 | uint16_t __iomem *mptr; |
2408 | uint16_t data; | 2408 | uint16_t data; |
2409 | DECLARE_COMPLETION(wait); | 2409 | DECLARE_COMPLETION_ONSTACK(wait); |
2410 | struct timer_list timer; | 2410 | struct timer_list timer; |
2411 | 2411 | ||
2412 | ENTER("qla1280_mailbox_command"); | 2412 | ENTER("qla1280_mailbox_command"); |
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c index 4655522a08d9..4a000d846a93 100644 --- a/drivers/usb/gadget/inode.c +++ b/drivers/usb/gadget/inode.c | |||
@@ -342,7 +342,7 @@ fail: | |||
342 | static ssize_t | 342 | static ssize_t |
343 | ep_io (struct ep_data *epdata, void *buf, unsigned len) | 343 | ep_io (struct ep_data *epdata, void *buf, unsigned len) |
344 | { | 344 | { |
345 | DECLARE_COMPLETION (done); | 345 | DECLARE_COMPLETION_ONSTACK (done); |
346 | int value; | 346 | int value; |
347 | 347 | ||
348 | spin_lock_irq (&epdata->dev->lock); | 348 | spin_lock_irq (&epdata->dev->lock); |
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index 0a64504c2545..8c18df869833 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c | |||
@@ -2869,7 +2869,7 @@ cleanup0: | |||
2869 | 2869 | ||
2870 | static int __exit omap_udc_remove(struct platform_device *pdev) | 2870 | static int __exit omap_udc_remove(struct platform_device *pdev) |
2871 | { | 2871 | { |
2872 | DECLARE_COMPLETION(done); | 2872 | DECLARE_COMPLETION_ONSTACK(done); |
2873 | 2873 | ||
2874 | if (!udc) | 2874 | if (!udc) |
2875 | return -ENODEV; | 2875 | return -ENODEV; |