]> git.baikalelectronics.ru Git - kernel.git/commitdiff
[PATCH] completions: lockdep annotate on stack completions
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Sun, 1 Oct 2006 06:28:10 +0000 (23:28 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 1 Oct 2006 07:39:24 +0000 (00:39 -0700)
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>
24 files changed:
arch/arm/kernel/ecard.c
arch/i386/kernel/smpboot.c
arch/powerpc/platforms/powermac/cpufreq_64.c
arch/powerpc/platforms/powermac/nvram.c
block/as-iosched.c
block/cfq-iosched.c
drivers/block/DAC960.c
drivers/block/cciss.c
drivers/block/cciss_scsi.c
drivers/block/paride/pd.c
drivers/block/pktcdvd.c
drivers/ide/ide-tape.c
drivers/macintosh/smu.c
drivers/macintosh/windfarm_smu_controls.c
drivers/macintosh/windfarm_smu_sensors.c
drivers/s390/scsi/zfcp_scsi.c
drivers/scsi/53c700.c
drivers/scsi/aic7xxx/aic79xx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/gdth.c
drivers/scsi/qla1280.c
drivers/usb/gadget/inode.c
drivers/usb/gadget/omap_udc.c
net/ipv4/ipvs/ip_vs_sync.c

index eca248d9eba44823986f1e6c30a1ffa7b8d1f77f..3e14b1348c0b715d77c77390bdd12e95668c5e0a 100644 (file)
@@ -295,7 +295,7 @@ ecard_task(void * unused)
  */
 static void ecard_call(struct ecard_request *req)
 {
-       DECLARE_COMPLETION(completion);
+       DECLARE_COMPLETION_ONSTACK(completion);
 
        req->complete = &completion;
 
index 82b26d5ce476554bd3eb6158cda3d664a6974224..0831f709f7771493d09f6e662eddd6950aeabe81 100644 (file)
@@ -1061,7 +1061,7 @@ static void __cpuinit do_warm_boot_cpu(void *p)
 
 static int __cpuinit __smp_prepare_cpu(int cpu)
 {
-       DECLARE_COMPLETION(done);
+       DECLARE_COMPLETION_ONSTACK(done);
        struct warm_boot_cpu_info info;
        struct work_struct task;
        int     apicid, ret;
index d30466d741942c621db357a0fc1aa18c3be21a2e..9d22361a26d6012a93393bfb664803aa6f73785a 100644 (file)
@@ -104,7 +104,7 @@ static void g5_smu_switch_volt(int speed_mode)
 {
        struct smu_simple_cmd   cmd;
 
-       DECLARE_COMPLETION(comp);
+       DECLARE_COMPLETION_ONSTACK(comp);
        smu_queue_simple(&cmd, SMU_CMD_POWER_COMMAND, 8, smu_done_complete,
                         &comp, 'V', 'S', 'L', 'E', 'W',
                         0xff, g5_fvt_cur+1, speed_mode);
index 6a36ea9bf67339d8f5e066419db811feed612dc7..692945c149194e77914318f71a9f8240567664d8 100644 (file)
@@ -195,7 +195,7 @@ static void pmu_nvram_complete(struct adb_request *req)
 static unsigned char pmu_nvram_read_byte(int addr)
 {
        struct adb_request req;
-       DECLARE_COMPLETION(req_complete); 
+       DECLARE_COMPLETION_ONSTACK(req_complete);
        
        req.arg = system_state == SYSTEM_RUNNING ? &req_complete : NULL;
        if (pmu_request(&req, pmu_nvram_complete, 3, PMU_READ_NVRAM,
@@ -211,7 +211,7 @@ static unsigned char pmu_nvram_read_byte(int addr)
 static void pmu_nvram_write_byte(int addr, unsigned char val)
 {
        struct adb_request req;
-       DECLARE_COMPLETION(req_complete); 
+       DECLARE_COMPLETION_ONSTACK(req_complete);
        
        req.arg = system_state == SYSTEM_RUNNING ? &req_complete : NULL;
        if (pmu_request(&req, pmu_nvram_complete, 4, PMU_WRITE_NVRAM,
index 165509e8659ef7642ec0e60ec5d6c511a46ccafe..50b95e4c1425b8ae3950451c146c020da4b0b146 100644 (file)
@@ -1479,7 +1479,7 @@ static int __init as_init(void)
 
 static void __exit as_exit(void)
 {
-       DECLARE_COMPLETION(all_gone);
+       DECLARE_COMPLETION_ONSTACK(all_gone);
        elv_unregister(&iosched_as);
        ioc_gone = &all_gone;
        /* ioc_gone's update must be visible before reading ioc_count */
index 99116e2a310aaa3506f724a93fcb1b1f06b4d2fc..d3d76136f53adea6293244f7cd9a9aa07f24b4d0 100644 (file)
@@ -2160,7 +2160,7 @@ static int __init cfq_init(void)
 
 static void __exit cfq_exit(void)
 {
-       DECLARE_COMPLETION(all_gone);
+       DECLARE_COMPLETION_ONSTACK(all_gone);
        elv_unregister(&iosched_cfq);
        ioc_gone = &all_gone;
        /* ioc_gone's update must be visible before reading ioc_count */
index 2568640430fb06e927d41f67918eb29a46d7163d..b3f639fbf220038a8b04fad8de15178741ab9e16 100644 (file)
@@ -770,7 +770,7 @@ static void DAC960_P_QueueCommand(DAC960_Command_T *Command)
 static void DAC960_ExecuteCommand(DAC960_Command_T *Command)
 {
   DAC960_Controller_T *Controller = Command->Controller;
-  DECLARE_COMPLETION(Completion);
+  DECLARE_COMPLETION_ONSTACK(Completion);
   unsigned long flags;
   Command->Completion = &Completion;
 
index d2d45eaf3681f0459ce9beb13e7c03bbe57bf29f..99f87efe0f588b2d4327516b7a7dac0304fcc39b 100644 (file)
@@ -879,7 +879,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
                        char *buff = NULL;
                        u64bit temp64;
                        unsigned long flags;
-                       DECLARE_COMPLETION(wait);
+                       DECLARE_COMPLETION_ONSTACK(wait);
 
                        if (!arg)
                                return -EINVAL;
@@ -997,7 +997,7 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
                        BYTE sg_used = 0;
                        int status = 0;
                        int i;
-                       DECLARE_COMPLETION(wait);
+                       DECLARE_COMPLETION_ONSTACK(wait);
                        __u32 left;
                        __u32 sz;
                        BYTE __user *data_ptr;
@@ -1816,7 +1816,7 @@ static int sendcmd_withirq(__u8 cmd,
        u64bit buff_dma_handle;
        unsigned long flags;
        int return_status;
-       DECLARE_COMPLETION(wait);
+       DECLARE_COMPLETION_ONSTACK(wait);
 
        if ((c = cmd_alloc(h, 0)) == NULL)
                return -ENOMEM;
index 05f79d7393f72960a1f8af8006ba025f939e4a43..bb15051ffbe0d316182cbb9ef11d9dba9b8f64c0 100644 (file)
@@ -766,7 +766,7 @@ cciss_scsi_do_simple_cmd(ctlr_info_t *c,
                        int direction)
 {
        unsigned long flags;
-       DECLARE_COMPLETION(wait);
+       DECLARE_COMPLETION_ONSTACK(wait);
 
        cp->cmd_type = CMD_IOCTL_PEND;          // treat this like an ioctl 
        cp->scsi_cmd = NULL;
index 38578b9dbfd1a2bf137dab3c76b6d6235148a82f..40a11e567970f30675f8b84590591146947d4e95 100644 (file)
@@ -713,7 +713,7 @@ static void do_pd_request(request_queue_t * q)
 static int pd_special_command(struct pd_unit *disk,
                      enum action (*func)(struct pd_unit *disk))
 {
-       DECLARE_COMPLETION(wait);
+       DECLARE_COMPLETION_ONSTACK(wait);
        struct request rq;
        int err = 0;
 
index 888d1aceeeff4084e1b48eff355cac3bdabedcd7..a6b2aa67c9b264869b71720971b4566b171ec71f 100644 (file)
@@ -348,7 +348,7 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command *
        char sense[SCSI_SENSE_BUFFERSIZE];
        request_queue_t *q;
        struct request *rq;
-       DECLARE_COMPLETION(wait);
+       DECLARE_COMPLETION_ONSTACK(wait);
        int err = 0;
 
        q = bdev_get_queue(pd->bdev);
index 2ebc3760f261dc7ed15f819f0c50492cb87bdca4..e2f4bb5490638de5c1326dc863c322417c99002b 100644 (file)
@@ -2764,7 +2764,7 @@ static void idetape_add_stage_tail (ide_drive_t *drive,idetape_stage_t *stage)
  */
 static void idetape_wait_for_request (ide_drive_t *drive, struct request *rq)
 {
-       DECLARE_COMPLETION(wait);
+       DECLARE_COMPLETION_ONSTACK(wait);
        idetape_tape_t *tape = drive->driver_data;
 
 #if IDETAPE_DEBUG_BUGS
index 090e40fc501335115e51c5c3138354b0dbccedd7..c0f9d82e46625593773f77733cfbe4fe3f979700 100644 (file)
@@ -870,7 +870,7 @@ int smu_queue_i2c(struct smu_i2c_cmd *cmd)
 
 static int smu_read_datablock(u8 *dest, unsigned int addr, unsigned int len)
 {
-       DECLARE_COMPLETION(comp);
+       DECLARE_COMPLETION_ONSTACK(comp);
        unsigned int chunk;
        struct smu_cmd cmd;
        int rc;
@@ -917,7 +917,7 @@ static int smu_read_datablock(u8 *dest, unsigned int addr, unsigned int len)
 
 static struct smu_sdbp_header *smu_create_sdb_partition(int id)
 {
-       DECLARE_COMPLETION(comp);
+       DECLARE_COMPLETION_ONSTACK(comp);
        struct smu_simple_cmd cmd;
        unsigned int addr, len, tlen;
        struct smu_sdbp_header *hdr;
index bff1f372f1885ebe5082048d48e580c8e008a8a8..31b750d61206acd13091d39a68218d0e251284e8 100644 (file)
@@ -56,7 +56,7 @@ static int smu_set_fan(int pwm, u8 id, u16 value)
 {
        struct smu_cmd cmd;
        u8 buffer[16];
-       DECLARE_COMPLETION(comp);
+       DECLARE_COMPLETION_ONSTACK(comp);
        int rc;
 
        /* Fill SMU command structure */
index defe9922ebd1b0ba287312c294d9de2fbfa122d5..01b4c50143ddc77010b0ef72bc57f85f11861a5d 100644 (file)
@@ -67,7 +67,7 @@ static void smu_ads_release(struct wf_sensor *sr)
 static int smu_read_adc(u8 id, s32 *value)
 {
        struct smu_simple_cmd   cmd;
-       DECLARE_COMPLETION(comp);
+       DECLARE_COMPLETION_ONSTACK(comp);
        int rc;
 
        rc = smu_queue_simple(&cmd, SMU_CMD_READ_ADC, 1,
index 7cafa34e4c7f5b17a0aa1e8cfe19b4c97057af2e..4d2bc7981324b4fc5abe939fbcca0f26895e0c91 100644 (file)
@@ -301,7 +301,7 @@ zfcp_scsi_command_sync(struct zfcp_unit *unit, struct scsi_cmnd *scpnt,
                       int use_timer)
 {
        int ret;
-       DECLARE_COMPLETION(wait);
+       DECLARE_COMPLETION_ONSTACK(wait);
 
        scpnt->SCp.ptr = (void *) &wait;  /* silent re-use */
        scpnt->scsi_done = zfcp_scsi_command_sync_handler;
index 657a3ab75399426b23f7028a925b37d2860fdd97..15ce40a7053a6dfae5ccfcc20fc69b507483106b 100644 (file)
@@ -1939,7 +1939,7 @@ NCR_700_abort(struct scsi_cmnd * SCp)
 STATIC int
 NCR_700_bus_reset(struct scsi_cmnd * SCp)
 {
-       DECLARE_COMPLETION(complete);
+       DECLARE_COMPLETION_ONSTACK(complete);
        struct NCR_700_Host_Parameters *hostdata = 
                (struct NCR_700_Host_Parameters *)SCp->device->host->hostdata[0];
 
index c7eeaced324afe4954a1fa79b06716dce5bf5d70..1faa008b5b817047d16c0f976523ba746105ab9a 100644 (file)
@@ -646,7 +646,7 @@ ahd_linux_dev_reset(struct scsi_cmnd *cmd)
        struct  ahd_initiator_tinfo *tinfo;
        struct  ahd_tmode_tstate *tstate;
        unsigned long flags;
-       DECLARE_COMPLETION(done);
+       DECLARE_COMPLETION_ONSTACK(done);
 
        reset_scb = NULL;
        paused = FALSE;
@@ -2251,7 +2251,7 @@ done:
        if (paused)
                ahd_unpause(ahd);
        if (wait) {
-               DECLARE_COMPLETION(done);
+               DECLARE_COMPLETION_ONSTACK(done);
 
                ahd->platform_data->eh_done = &done;
                ahd_unlock(ahd, &flags);
index 64c8b88a429fa1d11228138babe693518db30edb..339b85cb61cdbefb4a5bb9af77da7caf9f03b4ed 100644 (file)
@@ -2335,7 +2335,7 @@ done:
        if (paused)
                ahc_unpause(ahc);
        if (wait) {
-               DECLARE_COMPLETION(done);
+               DECLARE_COMPLETION_ONSTACK(done);
 
                ahc->platform_data->eh_done = &done;
                ahc_unlock(ahc, &flags);
index 43afd476e606adad053fb3a1ff8d94dccb5b1cb8..0f3eb22b979a1b8345dcf75e6d3bd83c09580c6e 100644 (file)
@@ -724,7 +724,7 @@ int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd,
                    int timeout, u32 *info)
 {
     Scsi_Cmnd *scp;
-    DECLARE_COMPLETION(wait);
+    DECLARE_COMPLETION_ONSTACK(wait);
     int rval;
 
     scp = kmalloc(sizeof(*scp), GFP_KERNEL);
@@ -764,7 +764,7 @@ int __gdth_execute(struct scsi_device *sdev, gdth_cmd_str *gdtcmd, char *cmnd,
 {
     Scsi_Cmnd *scp = scsi_allocate_device(sdev, 1, FALSE);
     unsigned bufflen = gdtcmd ? sizeof(gdth_cmd_str) : 0;
-    DECLARE_COMPLETION(wait);
+    DECLARE_COMPLETION_ONSTACK(wait);
     int rval;
 
     if (!scp)
index 8953991462d78f3d9600ea6445ed08820e133ec4..332151e2a0189eb57a529eb4461afc218811a492 100644 (file)
@@ -813,7 +813,7 @@ qla1280_error_action(struct scsi_cmnd *cmd, enum action action)
        uint16_t data;
        unsigned char *handle;
        int result, i;
-       DECLARE_COMPLETION(wait);
+       DECLARE_COMPLETION_ONSTACK(wait);
        struct timer_list timer;
 
        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)
        uint16_t *optr, *iptr;
        uint16_t __iomem *mptr;
        uint16_t data;
-       DECLARE_COMPLETION(wait);
+       DECLARE_COMPLETION_ONSTACK(wait);
        struct timer_list timer;
 
        ENTER("qla1280_mailbox_command");
index 4655522a08d95b10dfa227e267d3d144d3b9b694..4a000d846a936cc56ec8201d654c2135978aede1 100644 (file)
@@ -342,7 +342,7 @@ fail:
 static ssize_t
 ep_io (struct ep_data *epdata, void *buf, unsigned len)
 {
-       DECLARE_COMPLETION (done);
+       DECLARE_COMPLETION_ONSTACK (done);
        int value;
 
        spin_lock_irq (&epdata->dev->lock);
index 0a64504c2545467409a2ebcae606c2e151f9a95f..8c18df86983330a8e29118546a680d208a90d74d 100644 (file)
@@ -2869,7 +2869,7 @@ cleanup0:
 
 static int __exit omap_udc_remove(struct platform_device *pdev)
 {
-       DECLARE_COMPLETION(done);
+       DECLARE_COMPLETION_ONSTACK(done);
 
        if (!udc)
                return -ENODEV;
index 6ab57d72b615b32ff875a52c0b5ad7a58db3c2d4..91a075edd68e379fc8fcad685ac1ecd53c4801b7 100644 (file)
@@ -836,7 +836,7 @@ static int fork_sync_thread(void *startup)
 
 int start_sync_thread(int state, char *mcast_ifn, __u8 syncid)
 {
-       DECLARE_COMPLETION(startup);
+       DECLARE_COMPLETION_ONSTACK(startup);
        pid_t pid;
 
        if ((state == IP_VS_STATE_MASTER && sync_master_pid) ||