Skip to content

Commit

Permalink
[S390] cio: remove casts from/to (void *).
Browse files Browse the repository at this point in the history
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Cornelia Huck authored and Martin Schwidefsky committed Oct 11, 2006
1 parent e7769b4 commit 12975ae
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions drivers/s390/cio/chsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ __s390_process_res_acc(struct subchannel_id schid, void *data)
struct res_acc_data *res_data;
struct subchannel *sch;

res_data = (struct res_acc_data *)data;
res_data = data;
sch = get_subchannel_by_schid(schid);
if (!sch)
/* Check if a subchannel is newly available. */
Expand Down Expand Up @@ -444,7 +444,7 @@ __get_chpid_from_lir(void *data)
u32 isinfo[28];
} *lir;

lir = (struct lir*) data;
lir = data;
if (!(lir->iq&0x80))
/* NULL link incident record */
return -EINVAL;
Expand Down Expand Up @@ -628,7 +628,7 @@ __chp_add(struct subchannel_id schid, void *data)
struct channel_path *chp;
struct subchannel *sch;

chp = (struct channel_path *)data;
chp = data;
sch = get_subchannel_by_schid(schid);
if (!sch)
/* Check if the subchannel is now available. */
Expand Down
2 changes: 1 addition & 1 deletion drivers/s390/cio/css.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ get_subchannel_by_schid(struct subchannel_id schid)
struct device *dev;

dev = bus_find_device(&css_bus_type, NULL,
(void *)&schid, check_subchannel);
&schid, check_subchannel);

return dev ? to_subchannel(dev) : NULL;
}
Expand Down
16 changes: 8 additions & 8 deletions drivers/s390/cio/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ ccw_device_add_changed(void *data)

struct ccw_device *cdev;

cdev = (struct ccw_device *)data;
cdev = data;
if (device_add(&cdev->dev)) {
put_device(&cdev->dev);
return;
Expand All @@ -612,7 +612,7 @@ ccw_device_do_unreg_rereg(void *data)
struct subchannel *sch;
int need_rename;

cdev = (struct ccw_device *)data;
cdev = data;
sch = to_subchannel(cdev->dev.parent);
if (cdev->private->dev_id.devno != sch->schib.pmcw.dev) {
/*
Expand Down Expand Up @@ -660,7 +660,7 @@ ccw_device_do_unreg_rereg(void *data)
snprintf (cdev->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x",
sch->schid.ssid, sch->schib.pmcw.dev);
PREPARE_WORK(&cdev->private->kick_work,
ccw_device_add_changed, (void *)cdev);
ccw_device_add_changed, cdev);
queue_work(ccw_device_work, &cdev->private->kick_work);
}

Expand All @@ -685,7 +685,7 @@ io_subchannel_register(void *data)
int ret;
unsigned long flags;

cdev = (struct ccw_device *) data;
cdev = data;
sch = to_subchannel(cdev->dev.parent);

if (klist_node_attached(&cdev->dev.knode_parent)) {
Expand Down Expand Up @@ -757,7 +757,7 @@ io_subchannel_recog_done(struct ccw_device *cdev)
break;
sch = to_subchannel(cdev->dev.parent);
PREPARE_WORK(&cdev->private->kick_work,
ccw_device_call_sch_unregister, (void *) cdev);
ccw_device_call_sch_unregister, cdev);
queue_work(slow_path_wq, &cdev->private->kick_work);
if (atomic_dec_and_test(&ccw_device_init_count))
wake_up(&ccw_device_init_wq);
Expand All @@ -772,7 +772,7 @@ io_subchannel_recog_done(struct ccw_device *cdev)
if (!get_device(&cdev->dev))
break;
PREPARE_WORK(&cdev->private->kick_work,
io_subchannel_register, (void *) cdev);
io_subchannel_register, cdev);
queue_work(slow_path_wq, &cdev->private->kick_work);
break;
}
Expand Down Expand Up @@ -910,7 +910,7 @@ io_subchannel_remove (struct subchannel *sch)
*/
if (get_device(&cdev->dev)) {
PREPARE_WORK(&cdev->private->kick_work,
ccw_device_unregister, (void *) cdev);
ccw_device_unregister, cdev);
queue_work(ccw_device_work, &cdev->private->kick_work);
}
return 0;
Expand Down Expand Up @@ -1053,7 +1053,7 @@ __ccwdev_check_busid(struct device *dev, void *id)
{
char *bus_id;

bus_id = (char *)id;
bus_id = id;

return (strncmp(bus_id, dev->bus_id, BUS_ID_SIZE) == 0);
}
Expand Down
28 changes: 14 additions & 14 deletions drivers/s390/cio/device_fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ ccw_device_handle_oper(struct ccw_device *cdev)
cdev->id.dev_model != cdev->private->senseid.dev_model ||
cdev->private->dev_id.devno != sch->schib.pmcw.dev) {
PREPARE_WORK(&cdev->private->kick_work,
ccw_device_do_unreg_rereg, (void *)cdev);
ccw_device_do_unreg_rereg, cdev);
queue_work(ccw_device_work, &cdev->private->kick_work);
return 0;
}
Expand Down Expand Up @@ -314,13 +314,13 @@ ccw_device_oper_notify(void *data)
struct subchannel *sch;
int ret;

cdev = (struct ccw_device *)data;
cdev = data;
sch = to_subchannel(cdev->dev.parent);
ret = (sch->driver && sch->driver->notify) ?
sch->driver->notify(&sch->dev, CIO_OPER) : 0;
if (!ret)
/* Driver doesn't want device back. */
ccw_device_do_unreg_rereg((void *)cdev);
ccw_device_do_unreg_rereg(cdev);
else {
/* Reenable channel measurements, if needed. */
cmf_reenable(cdev);
Expand Down Expand Up @@ -357,7 +357,7 @@ ccw_device_done(struct ccw_device *cdev, int state)
if (cdev->private->flags.donotify) {
cdev->private->flags.donotify = 0;
PREPARE_WORK(&cdev->private->kick_work, ccw_device_oper_notify,
(void *)cdev);
cdev);
queue_work(ccw_device_notify_work, &cdev->private->kick_work);
}
wake_up(&cdev->private->wait_q);
Expand Down Expand Up @@ -513,7 +513,7 @@ ccw_device_nopath_notify(void *data)
struct subchannel *sch;
int ret;

cdev = (struct ccw_device *)data;
cdev = data;
sch = to_subchannel(cdev->dev.parent);
/* Extra sanity. */
if (sch->lpm)
Expand All @@ -527,7 +527,7 @@ ccw_device_nopath_notify(void *data)
if (get_device(&cdev->dev)) {
PREPARE_WORK(&cdev->private->kick_work,
ccw_device_call_sch_unregister,
(void *)cdev);
cdev);
queue_work(ccw_device_work,
&cdev->private->kick_work);
} else
Expand Down Expand Up @@ -582,7 +582,7 @@ ccw_device_verify_done(struct ccw_device *cdev, int err)
break;
default:
PREPARE_WORK(&cdev->private->kick_work,
ccw_device_nopath_notify, (void *)cdev);
ccw_device_nopath_notify, cdev);
queue_work(ccw_device_notify_work, &cdev->private->kick_work);
ccw_device_done(cdev, DEV_STATE_NOT_OPER);
break;
Expand Down Expand Up @@ -713,7 +713,7 @@ ccw_device_offline_notoper(struct ccw_device *cdev, enum dev_event dev_event)
sch = to_subchannel(cdev->dev.parent);
if (get_device(&cdev->dev)) {
PREPARE_WORK(&cdev->private->kick_work,
ccw_device_call_sch_unregister, (void *)cdev);
ccw_device_call_sch_unregister, cdev);
queue_work(ccw_device_work, &cdev->private->kick_work);
}
wake_up(&cdev->private->wait_q);
Expand Down Expand Up @@ -744,7 +744,7 @@ ccw_device_online_notoper(struct ccw_device *cdev, enum dev_event dev_event)
}
if (get_device(&cdev->dev)) {
PREPARE_WORK(&cdev->private->kick_work,
ccw_device_call_sch_unregister, (void *)cdev);
ccw_device_call_sch_unregister, cdev);
queue_work(ccw_device_work, &cdev->private->kick_work);
}
wake_up(&cdev->private->wait_q);
Expand Down Expand Up @@ -849,7 +849,7 @@ ccw_device_online_timeout(struct ccw_device *cdev, enum dev_event dev_event)
sch = to_subchannel(cdev->dev.parent);
if (!sch->lpm) {
PREPARE_WORK(&cdev->private->kick_work,
ccw_device_nopath_notify, (void *)cdev);
ccw_device_nopath_notify, cdev);
queue_work(ccw_device_notify_work,
&cdev->private->kick_work);
} else
Expand Down Expand Up @@ -938,7 +938,7 @@ ccw_device_killing_irq(struct ccw_device *cdev, enum dev_event dev_event)
ERR_PTR(-EIO));
if (!sch->lpm) {
PREPARE_WORK(&cdev->private->kick_work,
ccw_device_nopath_notify, (void *)cdev);
ccw_device_nopath_notify, cdev);
queue_work(ccw_device_notify_work, &cdev->private->kick_work);
} else if (cdev->private->flags.doverify)
/* Start delayed path verification. */
Expand All @@ -961,7 +961,7 @@ ccw_device_killing_timeout(struct ccw_device *cdev, enum dev_event dev_event)
sch = to_subchannel(cdev->dev.parent);
if (!sch->lpm) {
PREPARE_WORK(&cdev->private->kick_work,
ccw_device_nopath_notify, (void *)cdev);
ccw_device_nopath_notify, cdev);
queue_work(ccw_device_notify_work,
&cdev->private->kick_work);
} else
Expand Down Expand Up @@ -990,7 +990,7 @@ void device_kill_io(struct subchannel *sch)
if (ret == -ENODEV) {
if (!sch->lpm) {
PREPARE_WORK(&cdev->private->kick_work,
ccw_device_nopath_notify, (void *)cdev);
ccw_device_nopath_notify, cdev);
queue_work(ccw_device_notify_work,
&cdev->private->kick_work);
} else
Expand All @@ -1002,7 +1002,7 @@ void device_kill_io(struct subchannel *sch)
ERR_PTR(-EIO));
if (!sch->lpm) {
PREPARE_WORK(&cdev->private->kick_work,
ccw_device_nopath_notify, (void *)cdev);
ccw_device_nopath_notify, cdev);
queue_work(ccw_device_notify_work, &cdev->private->kick_work);
} else
/* Start delayed path verification. */
Expand Down

0 comments on commit 12975ae

Please sign in to comment.