提交 7712f83a 编写于 作者: H Heiko Carstens 提交者: Martin Schwidefsky

[S390] get rid of unused variables

Remove trivially unused variables as detected with -Wunused-but-set-variable.
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 66ceed5a
...@@ -130,9 +130,7 @@ static void appldata_work_fn(struct work_struct *work) ...@@ -130,9 +130,7 @@ static void appldata_work_fn(struct work_struct *work)
{ {
struct list_head *lh; struct list_head *lh;
struct appldata_ops *ops; struct appldata_ops *ops;
int i;
i = 0;
get_online_cpus(); get_online_cpus();
mutex_lock(&appldata_ops_mutex); mutex_lock(&appldata_ops_mutex);
list_for_each(lh, &appldata_ops_list) { list_for_each(lh, &appldata_ops_list) {
......
...@@ -681,8 +681,6 @@ void ...@@ -681,8 +681,6 @@ void
segment_save(char *name) segment_save(char *name)
{ {
struct dcss_segment *seg; struct dcss_segment *seg;
int startpfn = 0;
int endpfn = 0;
char cmd1[160]; char cmd1[160];
char cmd2[80]; char cmd2[80];
int i, response; int i, response;
...@@ -698,8 +696,6 @@ segment_save(char *name) ...@@ -698,8 +696,6 @@ segment_save(char *name)
goto out; goto out;
} }
startpfn = seg->start_addr >> PAGE_SHIFT;
endpfn = (seg->end) >> PAGE_SHIFT;
sprintf(cmd1, "DEFSEG %s", name); sprintf(cmd1, "DEFSEG %s", name);
for (i=0; i<seg->segcnt; i++) { for (i=0; i<seg->segcnt; i++) {
sprintf(cmd1+strlen(cmd1), " %lX-%lX %s", sprintf(cmd1+strlen(cmd1), " %lX-%lX %s",
......
...@@ -253,13 +253,11 @@ int dasd_alias_make_device_known_to_lcu(struct dasd_device *device) ...@@ -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) void dasd_alias_lcu_setup_complete(struct dasd_device *device)
{ {
struct dasd_eckd_private *private;
unsigned long flags; unsigned long flags;
struct alias_server *server; struct alias_server *server;
struct alias_lcu *lcu; struct alias_lcu *lcu;
struct dasd_uid uid; struct dasd_uid uid;
private = (struct dasd_eckd_private *) device->private;
device->discipline->get_uid(device, &uid); device->discipline->get_uid(device, &uid);
lcu = NULL; lcu = NULL;
spin_lock_irqsave(&aliastree.lock, flags); spin_lock_irqsave(&aliastree.lock, flags);
...@@ -279,13 +277,11 @@ void dasd_alias_lcu_setup_complete(struct dasd_device *device) ...@@ -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) void dasd_alias_wait_for_lcu_setup(struct dasd_device *device)
{ {
struct dasd_eckd_private *private;
unsigned long flags; unsigned long flags;
struct alias_server *server; struct alias_server *server;
struct alias_lcu *lcu; struct alias_lcu *lcu;
struct dasd_uid uid; struct dasd_uid uid;
private = (struct dasd_eckd_private *) device->private;
device->discipline->get_uid(device, &uid); device->discipline->get_uid(device, &uid);
lcu = NULL; lcu = NULL;
spin_lock_irqsave(&aliastree.lock, flags); spin_lock_irqsave(&aliastree.lock, flags);
......
...@@ -1611,10 +1611,8 @@ static void dasd_eckd_analysis_callback(struct dasd_ccw_req *init_cqr, ...@@ -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) static int dasd_eckd_start_analysis(struct dasd_block *block)
{ {
struct dasd_eckd_private *private;
struct dasd_ccw_req *init_cqr; struct dasd_ccw_req *init_cqr;
private = (struct dasd_eckd_private *) block->base->private;
init_cqr = dasd_eckd_analysis_ccw(block->base); init_cqr = dasd_eckd_analysis_ccw(block->base);
if (IS_ERR(init_cqr)) if (IS_ERR(init_cqr))
return PTR_ERR(init_cqr); return PTR_ERR(init_cqr);
...@@ -2264,7 +2262,6 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_cmd_track( ...@@ -2264,7 +2262,6 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_cmd_track(
unsigned int blk_per_trk, unsigned int blk_per_trk,
unsigned int blksize) unsigned int blksize)
{ {
struct dasd_eckd_private *private;
unsigned long *idaws; unsigned long *idaws;
struct dasd_ccw_req *cqr; struct dasd_ccw_req *cqr;
struct ccw1 *ccw; struct ccw1 *ccw;
...@@ -2283,7 +2280,6 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_cmd_track( ...@@ -2283,7 +2280,6 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_cmd_track(
unsigned int recoffs; unsigned int recoffs;
basedev = block->base; basedev = block->base;
private = (struct dasd_eckd_private *) basedev->private;
if (rq_data_dir(req) == READ) if (rq_data_dir(req) == READ)
cmd = DASD_ECKD_CCW_READ_TRACK_DATA; cmd = DASD_ECKD_CCW_READ_TRACK_DATA;
else if (rq_data_dir(req) == WRITE) else if (rq_data_dir(req) == WRITE)
...@@ -2573,7 +2569,6 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_tpm_track( ...@@ -2573,7 +2569,6 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_tpm_track(
unsigned int blk_per_trk, unsigned int blk_per_trk,
unsigned int blksize) unsigned int blksize)
{ {
struct dasd_eckd_private *private;
struct dasd_ccw_req *cqr; struct dasd_ccw_req *cqr;
struct req_iterator iter; struct req_iterator iter;
struct bio_vec *bv; struct bio_vec *bv;
...@@ -2594,7 +2589,6 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_tpm_track( ...@@ -2594,7 +2589,6 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_tpm_track(
unsigned int count, count_to_trk_end; unsigned int count, count_to_trk_end;
basedev = block->base; basedev = block->base;
private = (struct dasd_eckd_private *) basedev->private;
if (rq_data_dir(req) == READ) { if (rq_data_dir(req) == READ) {
cmd = DASD_ECKD_CCW_READ_TRACK_DATA; cmd = DASD_ECKD_CCW_READ_TRACK_DATA;
itcw_op = ITCW_OP_READ; itcw_op = ITCW_OP_READ;
...@@ -2801,7 +2795,6 @@ static struct dasd_ccw_req *dasd_raw_build_cp(struct dasd_device *startdev, ...@@ -2801,7 +2795,6 @@ static struct dasd_ccw_req *dasd_raw_build_cp(struct dasd_device *startdev,
struct dasd_block *block, struct dasd_block *block,
struct request *req) struct request *req)
{ {
struct dasd_eckd_private *private;
unsigned long *idaws; unsigned long *idaws;
struct dasd_device *basedev; struct dasd_device *basedev;
struct dasd_ccw_req *cqr; struct dasd_ccw_req *cqr;
...@@ -2836,7 +2829,6 @@ static struct dasd_ccw_req *dasd_raw_build_cp(struct dasd_device *startdev, ...@@ -2836,7 +2829,6 @@ static struct dasd_ccw_req *dasd_raw_build_cp(struct dasd_device *startdev,
trkcount = last_trk - first_trk + 1; trkcount = last_trk - first_trk + 1;
first_offs = 0; first_offs = 0;
basedev = block->base; basedev = block->base;
private = (struct dasd_eckd_private *) basedev->private;
if (rq_data_dir(req) == READ) if (rq_data_dir(req) == READ)
cmd = DASD_ECKD_CCW_READ_TRACK; cmd = DASD_ECKD_CCW_READ_TRACK;
......
...@@ -598,7 +598,6 @@ __raw3270_size_device(struct raw3270 *rp) ...@@ -598,7 +598,6 @@ __raw3270_size_device(struct raw3270 *rp)
static const unsigned char wbuf[] = static const unsigned char wbuf[] =
{ 0x00, 0x07, 0x01, 0xff, 0x03, 0x00, 0x81 }; { 0x00, 0x07, 0x01, 0xff, 0x03, 0x00, 0x81 };
struct raw3270_ua *uap; struct raw3270_ua *uap;
unsigned short count;
int rc; int rc;
/* /*
...@@ -653,7 +652,6 @@ __raw3270_size_device(struct raw3270 *rp) ...@@ -653,7 +652,6 @@ __raw3270_size_device(struct raw3270 *rp)
if (rc) if (rc)
return rc; return rc;
/* Got a Query Reply */ /* Got a Query Reply */
count = sizeof(rp->init_data) - rp->init_request.rescnt;
uap = (struct raw3270_ua *) (rp->init_data + 1); uap = (struct raw3270_ua *) (rp->init_data + 1);
/* Paranoia check. */ /* Paranoia check. */
if (rp->init_data[0] != 0x88 || uap->uab.qcode != 0x81) if (rp->init_data[0] != 0x88 || uap->uab.qcode != 0x81)
......
...@@ -69,9 +69,6 @@ static DEFINE_MUTEX(sdias_mutex); ...@@ -69,9 +69,6 @@ static DEFINE_MUTEX(sdias_mutex);
static void sdias_callback(struct sclp_req *request, void *data) static void sdias_callback(struct sclp_req *request, void *data)
{ {
struct sdias_sccb *cbsccb;
cbsccb = (struct sdias_sccb *) request->sccb;
sclp_req_done = 1; sclp_req_done = 1;
wake_up(&sdias_wq); /* Inform caller, that request is complete */ wake_up(&sdias_wq); /* Inform caller, that request is complete */
TRACE("callback done\n"); TRACE("callback done\n");
......
...@@ -796,10 +796,8 @@ static void tape_3590_med_state_set(struct tape_device *device, ...@@ -796,10 +796,8 @@ static void tape_3590_med_state_set(struct tape_device *device,
static int static int
tape_3590_done(struct tape_device *device, struct tape_request *request) 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]); DBF_EVENT(6, "%s done\n", tape_op_verbose[request->op]);
disc_data = device->discdata;
switch (request->op) { switch (request->op) {
case TO_BSB: case TO_BSB:
...@@ -1397,11 +1395,9 @@ static int tape_3590_crypt_error(struct tape_device *device, ...@@ -1397,11 +1395,9 @@ static int tape_3590_crypt_error(struct tape_device *device,
u8 cu_rc, ekm_rc1; u8 cu_rc, ekm_rc1;
u16 ekm_rc2; u16 ekm_rc2;
u32 drv_rc; u32 drv_rc;
const char *bus_id;
char *sense; char *sense;
sense = ((struct tape_3590_sense *) irb->ecw)->fmt.data; sense = ((struct tape_3590_sense *) irb->ecw)->fmt.data;
bus_id = dev_name(&device->cdev->dev);
cu_rc = sense[0]; cu_rc = sense[0];
drv_rc = *((u32*) &sense[5]) & 0xffffff; drv_rc = *((u32*) &sense[5]) & 0xffffff;
ekm_rc1 = sense[9]; ekm_rc1 = sense[9];
...@@ -1429,7 +1425,6 @@ tape_3590_unit_check(struct tape_device *device, struct tape_request *request, ...@@ -1429,7 +1425,6 @@ tape_3590_unit_check(struct tape_device *device, struct tape_request *request,
struct irb *irb) struct irb *irb)
{ {
struct tape_3590_sense *sense; struct tape_3590_sense *sense;
int rc;
#ifdef CONFIG_S390_TAPE_BLOCK #ifdef CONFIG_S390_TAPE_BLOCK
if (request->op == TO_BLOCK) { if (request->op == TO_BLOCK) {
...@@ -1454,7 +1449,6 @@ tape_3590_unit_check(struct tape_device *device, struct tape_request *request, ...@@ -1454,7 +1449,6 @@ tape_3590_unit_check(struct tape_device *device, struct tape_request *request,
* - "break": basic error recovery is done * - "break": basic error recovery is done
* - "goto out:": just print error message if available * - "goto out:": just print error message if available
*/ */
rc = -EIO;
switch (sense->rc_rqc) { switch (sense->rc_rqc) {
case 0x1110: case 0x1110:
......
...@@ -841,9 +841,6 @@ ccw_device_w4sense(struct ccw_device *cdev, enum dev_event dev_event) ...@@ -841,9 +841,6 @@ ccw_device_w4sense(struct ccw_device *cdev, enum dev_event dev_event)
static void static void
ccw_device_killing_irq(struct ccw_device *cdev, enum dev_event dev_event) 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); ccw_device_set_timeout(cdev, 0);
/* Start delayed path verification. */ /* Start delayed path verification. */
ccw_device_online_verify(cdev, 0); ccw_device_online_verify(cdev, 0);
......
...@@ -418,12 +418,9 @@ int ccw_device_resume(struct ccw_device *cdev) ...@@ -418,12 +418,9 @@ int ccw_device_resume(struct ccw_device *cdev)
int int
ccw_device_call_handler(struct ccw_device *cdev) ccw_device_call_handler(struct ccw_device *cdev)
{ {
struct subchannel *sch;
unsigned int stctl; unsigned int stctl;
int ending_status; int ending_status;
sch = to_subchannel(cdev->dev.parent);
/* /*
* we allow for the device action handler if . * we allow for the device action handler if .
* - we received ending status * - we received ending status
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册