[S390] get rid of unused variables
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 23 May 2011 08:24:25 +0000 (10:24 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 23 May 2011 08:24:28 +0000 (10:24 +0200)
Remove trivially unused variables as detected with -Wunused-but-set-variable.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/appldata/appldata_base.c
arch/s390/mm/extmem.c
drivers/s390/block/dasd_alias.c
drivers/s390/block/dasd_eckd.c
drivers/s390/char/raw3270.c
drivers/s390/char/sclp_sdias.c
drivers/s390/char/tape_3590.c
drivers/s390/cio/device_fsm.c
drivers/s390/cio/device_ops.c

index 5c91995b74e4b598e7eb5e974492ecb13087ff6a..24bff4f1cc52ba906a9a6432af6f4e1ebf16c818 100644 (file)
@@ -130,9 +130,7 @@ static void appldata_work_fn(struct work_struct *work)
 {
        struct list_head *lh;
        struct appldata_ops *ops;
-       int i;
 
-       i = 0;
        get_online_cpus();
        mutex_lock(&appldata_ops_mutex);
        list_for_each(lh, &appldata_ops_list) {
index 3cc95dd0a3a6a1cb7bc133f0890786bf2324e4bf..214dd7b239346a5a939cb6ca33e1af378cf9d210 100644 (file)
@@ -681,8 +681,6 @@ void
 segment_save(char *name)
 {
        struct dcss_segment *seg;
-       int startpfn = 0;
-       int endpfn = 0;
        char cmd1[160];
        char cmd2[80];
        int i, response;
@@ -698,8 +696,6 @@ segment_save(char *name)
                goto out;
        }
 
-       startpfn = seg->start_addr >> PAGE_SHIFT;
-       endpfn = (seg->end) >> PAGE_SHIFT;
        sprintf(cmd1, "DEFSEG %s", name);
        for (i=0; i<seg->segcnt; i++) {
                sprintf(cmd1+strlen(cmd1), " %lX-%lX %s",
index 2b771f18d1adc836f36c6c509060af409f9f1bed..c388eda1e2b195943200e4af7308ee1c69935083 100644 (file)
@@ -253,13 +253,11 @@ int dasd_alias_make_device_known_to_lcu(struct dasd_device *device)
  */
 void dasd_alias_lcu_setup_complete(struct dasd_device *device)
 {
-       struct dasd_eckd_private *private;
        unsigned long flags;
        struct alias_server *server;
        struct alias_lcu *lcu;
        struct dasd_uid uid;
 
-       private = (struct dasd_eckd_private *) device->private;
        device->discipline->get_uid(device, &uid);
        lcu = NULL;
        spin_lock_irqsave(&aliastree.lock, flags);
@@ -279,13 +277,11 @@ void dasd_alias_lcu_setup_complete(struct dasd_device *device)
 
 void dasd_alias_wait_for_lcu_setup(struct dasd_device *device)
 {
-       struct dasd_eckd_private *private;
        unsigned long flags;
        struct alias_server *server;
        struct alias_lcu *lcu;
        struct dasd_uid uid;
 
-       private = (struct dasd_eckd_private *) device->private;
        device->discipline->get_uid(device, &uid);
        lcu = NULL;
        spin_lock_irqsave(&aliastree.lock, flags);
index 3ebdf5f92f8f945fabad2e9744fa82f106b8a33b..58209434c99279b6dd4f3897d4162d9a05cd3a5c 100644 (file)
@@ -1611,10 +1611,8 @@ static void dasd_eckd_analysis_callback(struct dasd_ccw_req *init_cqr,
 
 static int dasd_eckd_start_analysis(struct dasd_block *block)
 {
-       struct dasd_eckd_private *private;
        struct dasd_ccw_req *init_cqr;
 
-       private = (struct dasd_eckd_private *) block->base->private;
        init_cqr = dasd_eckd_analysis_ccw(block->base);
        if (IS_ERR(init_cqr))
                return PTR_ERR(init_cqr);
@@ -2264,7 +2262,6 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_cmd_track(
                                               unsigned int blk_per_trk,
                                               unsigned int blksize)
 {
-       struct dasd_eckd_private *private;
        unsigned long *idaws;
        struct dasd_ccw_req *cqr;
        struct ccw1 *ccw;
@@ -2283,7 +2280,6 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_cmd_track(
        unsigned int recoffs;
 
        basedev = block->base;
-       private = (struct dasd_eckd_private *) basedev->private;
        if (rq_data_dir(req) == READ)
                cmd = DASD_ECKD_CCW_READ_TRACK_DATA;
        else if (rq_data_dir(req) == WRITE)
@@ -2573,7 +2569,6 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_tpm_track(
                                               unsigned int blk_per_trk,
                                               unsigned int blksize)
 {
-       struct dasd_eckd_private *private;
        struct dasd_ccw_req *cqr;
        struct req_iterator iter;
        struct bio_vec *bv;
@@ -2594,7 +2589,6 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_tpm_track(
        unsigned int count, count_to_trk_end;
 
        basedev = block->base;
-       private = (struct dasd_eckd_private *) basedev->private;
        if (rq_data_dir(req) == READ) {
                cmd = DASD_ECKD_CCW_READ_TRACK_DATA;
                itcw_op = ITCW_OP_READ;
@@ -2801,7 +2795,6 @@ static struct dasd_ccw_req *dasd_raw_build_cp(struct dasd_device *startdev,
                                               struct dasd_block *block,
                                               struct request *req)
 {
-       struct dasd_eckd_private *private;
        unsigned long *idaws;
        struct dasd_device *basedev;
        struct dasd_ccw_req *cqr;
@@ -2836,7 +2829,6 @@ static struct dasd_ccw_req *dasd_raw_build_cp(struct dasd_device *startdev,
        trkcount = last_trk - first_trk + 1;
        first_offs = 0;
        basedev = block->base;
-       private = (struct dasd_eckd_private *) basedev->private;
 
        if (rq_data_dir(req) == READ)
                cmd = DASD_ECKD_CCW_READ_TRACK;
index e21a5c39ef20f2f29609ee989eb75213e6f99f84..810ac38631c35ac919ba7fb110c80d38d75b260f 100644 (file)
@@ -598,7 +598,6 @@ __raw3270_size_device(struct raw3270 *rp)
        static const unsigned char wbuf[] =
                { 0x00, 0x07, 0x01, 0xff, 0x03, 0x00, 0x81 };
        struct raw3270_ua *uap;
-       unsigned short count;
        int rc;
 
        /*
@@ -653,7 +652,6 @@ __raw3270_size_device(struct raw3270 *rp)
        if (rc)
                return rc;
        /* Got a Query Reply */
-       count = sizeof(rp->init_data) - rp->init_request.rescnt;
        uap = (struct raw3270_ua *) (rp->init_data + 1);
        /* Paranoia check. */
        if (rp->init_data[0] != 0x88 || uap->uab.qcode != 0x81)
index 6a1c58dc61a78e920c4e626ab61b04f1747c3418..fa733ecd3d70fe8c21915dc915d2c058a000eefa 100644 (file)
@@ -69,9 +69,6 @@ static DEFINE_MUTEX(sdias_mutex);
 
 static void sdias_callback(struct sclp_req *request, void *data)
 {
-       struct sdias_sccb *cbsccb;
-
-       cbsccb = (struct sdias_sccb *) request->sccb;
        sclp_req_done = 1;
        wake_up(&sdias_wq); /* Inform caller, that request is complete */
        TRACE("callback done\n");
index b98dcbd16711e7978d8c1fc58394f4797d851fe8..22db2529e1b2d906dcd46f3dfac7eac44bd02e14 100644 (file)
@@ -796,10 +796,8 @@ static void tape_3590_med_state_set(struct tape_device *device,
 static int
 tape_3590_done(struct tape_device *device, struct tape_request *request)
 {
-       struct tape_3590_disc_data *disc_data;
 
        DBF_EVENT(6, "%s done\n", tape_op_verbose[request->op]);
-       disc_data = device->discdata;
 
        switch (request->op) {
        case TO_BSB:
@@ -1397,11 +1395,9 @@ static int tape_3590_crypt_error(struct tape_device *device,
        u8 cu_rc, ekm_rc1;
        u16 ekm_rc2;
        u32 drv_rc;
-       const char *bus_id;
        char *sense;
 
        sense = ((struct tape_3590_sense *) irb->ecw)->fmt.data;
-       bus_id = dev_name(&device->cdev->dev);
        cu_rc = sense[0];
        drv_rc = *((u32*) &sense[5]) & 0xffffff;
        ekm_rc1 = sense[9];
@@ -1429,7 +1425,6 @@ tape_3590_unit_check(struct tape_device *device, struct tape_request *request,
                     struct irb *irb)
 {
        struct tape_3590_sense *sense;
-       int rc;
 
 #ifdef CONFIG_S390_TAPE_BLOCK
        if (request->op == TO_BLOCK) {
@@ -1454,7 +1449,6 @@ tape_3590_unit_check(struct tape_device *device, struct tape_request *request,
         *   - "break":     basic error recovery is done
         *   - "goto out:": just print error message if available
         */
-       rc = -EIO;
        switch (sense->rc_rqc) {
 
        case 0x1110:
index e087a8685f950f5c7d575d096037995453aa81b3..52c233fa2b1281d14a2881618465606447bef365 100644 (file)
@@ -841,9 +841,6 @@ call_handler:
 static void
 ccw_device_killing_irq(struct ccw_device *cdev, enum dev_event dev_event)
 {
-       struct subchannel *sch;
-
-       sch = to_subchannel(cdev->dev.parent);
        ccw_device_set_timeout(cdev, 0);
        /* Start delayed path verification. */
        ccw_device_online_verify(cdev, 0);
index 651976b54af80395547d675f1c538580521e0644..f98698d5735e887e0fb6cc46f00a63012ecdccb5 100644 (file)
@@ -418,12 +418,9 @@ int ccw_device_resume(struct ccw_device *cdev)
 int
 ccw_device_call_handler(struct ccw_device *cdev)
 {
-       struct subchannel *sch;
        unsigned int stctl;
        int ending_status;
 
-       sch = to_subchannel(cdev->dev.parent);
-
        /*
         * we allow for the device action handler if .
         *  - we received ending status