Commit 12975aef authored by Cornelia Huck's avatar Cornelia Huck Committed by Martin Schwidefsky

[S390] cio: remove casts from/to (void *).

Signed-off-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent e7769b48
...@@ -370,7 +370,7 @@ __s390_process_res_acc(struct subchannel_id schid, void *data) ...@@ -370,7 +370,7 @@ __s390_process_res_acc(struct subchannel_id schid, void *data)
struct res_acc_data *res_data; struct res_acc_data *res_data;
struct subchannel *sch; struct subchannel *sch;
res_data = (struct res_acc_data *)data; res_data = data;
sch = get_subchannel_by_schid(schid); sch = get_subchannel_by_schid(schid);
if (!sch) if (!sch)
/* Check if a subchannel is newly available. */ /* Check if a subchannel is newly available. */
...@@ -444,7 +444,7 @@ __get_chpid_from_lir(void *data) ...@@ -444,7 +444,7 @@ __get_chpid_from_lir(void *data)
u32 isinfo[28]; u32 isinfo[28];
} *lir; } *lir;
lir = (struct lir*) data; lir = data;
if (!(lir->iq&0x80)) if (!(lir->iq&0x80))
/* NULL link incident record */ /* NULL link incident record */
return -EINVAL; return -EINVAL;
...@@ -628,7 +628,7 @@ __chp_add(struct subchannel_id schid, void *data) ...@@ -628,7 +628,7 @@ __chp_add(struct subchannel_id schid, void *data)
struct channel_path *chp; struct channel_path *chp;
struct subchannel *sch; struct subchannel *sch;
chp = (struct channel_path *)data; chp = data;
sch = get_subchannel_by_schid(schid); sch = get_subchannel_by_schid(schid);
if (!sch) if (!sch)
/* Check if the subchannel is now available. */ /* Check if the subchannel is now available. */
......
...@@ -177,7 +177,7 @@ get_subchannel_by_schid(struct subchannel_id schid) ...@@ -177,7 +177,7 @@ get_subchannel_by_schid(struct subchannel_id schid)
struct device *dev; struct device *dev;
dev = bus_find_device(&css_bus_type, NULL, dev = bus_find_device(&css_bus_type, NULL,
(void *)&schid, check_subchannel); &schid, check_subchannel);
return dev ? to_subchannel(dev) : NULL; return dev ? to_subchannel(dev) : NULL;
} }
......
...@@ -591,7 +591,7 @@ ccw_device_add_changed(void *data) ...@@ -591,7 +591,7 @@ ccw_device_add_changed(void *data)
struct ccw_device *cdev; struct ccw_device *cdev;
cdev = (struct ccw_device *)data; cdev = data;
if (device_add(&cdev->dev)) { if (device_add(&cdev->dev)) {
put_device(&cdev->dev); put_device(&cdev->dev);
return; return;
...@@ -612,7 +612,7 @@ ccw_device_do_unreg_rereg(void *data) ...@@ -612,7 +612,7 @@ ccw_device_do_unreg_rereg(void *data)
struct subchannel *sch; struct subchannel *sch;
int need_rename; int need_rename;
cdev = (struct ccw_device *)data; cdev = data;
sch = to_subchannel(cdev->dev.parent); sch = to_subchannel(cdev->dev.parent);
if (cdev->private->dev_id.devno != sch->schib.pmcw.dev) { if (cdev->private->dev_id.devno != sch->schib.pmcw.dev) {
/* /*
...@@ -660,7 +660,7 @@ ccw_device_do_unreg_rereg(void *data) ...@@ -660,7 +660,7 @@ ccw_device_do_unreg_rereg(void *data)
snprintf (cdev->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x", snprintf (cdev->dev.bus_id, BUS_ID_SIZE, "0.%x.%04x",
sch->schid.ssid, sch->schib.pmcw.dev); sch->schid.ssid, sch->schib.pmcw.dev);
PREPARE_WORK(&cdev->private->kick_work, 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); queue_work(ccw_device_work, &cdev->private->kick_work);
} }
...@@ -685,7 +685,7 @@ io_subchannel_register(void *data) ...@@ -685,7 +685,7 @@ io_subchannel_register(void *data)
int ret; int ret;
unsigned long flags; unsigned long flags;
cdev = (struct ccw_device *) data; cdev = data;
sch = to_subchannel(cdev->dev.parent); sch = to_subchannel(cdev->dev.parent);
if (klist_node_attached(&cdev->dev.knode_parent)) { if (klist_node_attached(&cdev->dev.knode_parent)) {
...@@ -757,7 +757,7 @@ io_subchannel_recog_done(struct ccw_device *cdev) ...@@ -757,7 +757,7 @@ io_subchannel_recog_done(struct ccw_device *cdev)
break; break;
sch = to_subchannel(cdev->dev.parent); sch = to_subchannel(cdev->dev.parent);
PREPARE_WORK(&cdev->private->kick_work, 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); queue_work(slow_path_wq, &cdev->private->kick_work);
if (atomic_dec_and_test(&ccw_device_init_count)) if (atomic_dec_and_test(&ccw_device_init_count))
wake_up(&ccw_device_init_wq); wake_up(&ccw_device_init_wq);
...@@ -772,7 +772,7 @@ io_subchannel_recog_done(struct ccw_device *cdev) ...@@ -772,7 +772,7 @@ io_subchannel_recog_done(struct ccw_device *cdev)
if (!get_device(&cdev->dev)) if (!get_device(&cdev->dev))
break; break;
PREPARE_WORK(&cdev->private->kick_work, PREPARE_WORK(&cdev->private->kick_work,
io_subchannel_register, (void *) cdev); io_subchannel_register, cdev);
queue_work(slow_path_wq, &cdev->private->kick_work); queue_work(slow_path_wq, &cdev->private->kick_work);
break; break;
} }
...@@ -910,7 +910,7 @@ io_subchannel_remove (struct subchannel *sch) ...@@ -910,7 +910,7 @@ io_subchannel_remove (struct subchannel *sch)
*/ */
if (get_device(&cdev->dev)) { if (get_device(&cdev->dev)) {
PREPARE_WORK(&cdev->private->kick_work, PREPARE_WORK(&cdev->private->kick_work,
ccw_device_unregister, (void *) cdev); ccw_device_unregister, cdev);
queue_work(ccw_device_work, &cdev->private->kick_work); queue_work(ccw_device_work, &cdev->private->kick_work);
} }
return 0; return 0;
...@@ -1053,7 +1053,7 @@ __ccwdev_check_busid(struct device *dev, void *id) ...@@ -1053,7 +1053,7 @@ __ccwdev_check_busid(struct device *dev, void *id)
{ {
char *bus_id; char *bus_id;
bus_id = (char *)id; bus_id = id;
return (strncmp(bus_id, dev->bus_id, BUS_ID_SIZE) == 0); return (strncmp(bus_id, dev->bus_id, BUS_ID_SIZE) == 0);
} }
......
...@@ -173,7 +173,7 @@ ccw_device_handle_oper(struct ccw_device *cdev) ...@@ -173,7 +173,7 @@ ccw_device_handle_oper(struct ccw_device *cdev)
cdev->id.dev_model != cdev->private->senseid.dev_model || cdev->id.dev_model != cdev->private->senseid.dev_model ||
cdev->private->dev_id.devno != sch->schib.pmcw.dev) { cdev->private->dev_id.devno != sch->schib.pmcw.dev) {
PREPARE_WORK(&cdev->private->kick_work, 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); queue_work(ccw_device_work, &cdev->private->kick_work);
return 0; return 0;
} }
...@@ -314,13 +314,13 @@ ccw_device_oper_notify(void *data) ...@@ -314,13 +314,13 @@ ccw_device_oper_notify(void *data)
struct subchannel *sch; struct subchannel *sch;
int ret; int ret;
cdev = (struct ccw_device *)data; cdev = data;
sch = to_subchannel(cdev->dev.parent); sch = to_subchannel(cdev->dev.parent);
ret = (sch->driver && sch->driver->notify) ? ret = (sch->driver && sch->driver->notify) ?
sch->driver->notify(&sch->dev, CIO_OPER) : 0; sch->driver->notify(&sch->dev, CIO_OPER) : 0;
if (!ret) if (!ret)
/* Driver doesn't want device back. */ /* Driver doesn't want device back. */
ccw_device_do_unreg_rereg((void *)cdev); ccw_device_do_unreg_rereg(cdev);
else { else {
/* Reenable channel measurements, if needed. */ /* Reenable channel measurements, if needed. */
cmf_reenable(cdev); cmf_reenable(cdev);
...@@ -357,7 +357,7 @@ ccw_device_done(struct ccw_device *cdev, int state) ...@@ -357,7 +357,7 @@ ccw_device_done(struct ccw_device *cdev, int state)
if (cdev->private->flags.donotify) { if (cdev->private->flags.donotify) {
cdev->private->flags.donotify = 0; cdev->private->flags.donotify = 0;
PREPARE_WORK(&cdev->private->kick_work, ccw_device_oper_notify, PREPARE_WORK(&cdev->private->kick_work, ccw_device_oper_notify,
(void *)cdev); cdev);
queue_work(ccw_device_notify_work, &cdev->private->kick_work); queue_work(ccw_device_notify_work, &cdev->private->kick_work);
} }
wake_up(&cdev->private->wait_q); wake_up(&cdev->private->wait_q);
...@@ -513,7 +513,7 @@ ccw_device_nopath_notify(void *data) ...@@ -513,7 +513,7 @@ ccw_device_nopath_notify(void *data)
struct subchannel *sch; struct subchannel *sch;
int ret; int ret;
cdev = (struct ccw_device *)data; cdev = data;
sch = to_subchannel(cdev->dev.parent); sch = to_subchannel(cdev->dev.parent);
/* Extra sanity. */ /* Extra sanity. */
if (sch->lpm) if (sch->lpm)
...@@ -527,7 +527,7 @@ ccw_device_nopath_notify(void *data) ...@@ -527,7 +527,7 @@ ccw_device_nopath_notify(void *data)
if (get_device(&cdev->dev)) { if (get_device(&cdev->dev)) {
PREPARE_WORK(&cdev->private->kick_work, PREPARE_WORK(&cdev->private->kick_work,
ccw_device_call_sch_unregister, ccw_device_call_sch_unregister,
(void *)cdev); cdev);
queue_work(ccw_device_work, queue_work(ccw_device_work,
&cdev->private->kick_work); &cdev->private->kick_work);
} else } else
...@@ -582,7 +582,7 @@ ccw_device_verify_done(struct ccw_device *cdev, int err) ...@@ -582,7 +582,7 @@ ccw_device_verify_done(struct ccw_device *cdev, int err)
break; break;
default: default:
PREPARE_WORK(&cdev->private->kick_work, 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); queue_work(ccw_device_notify_work, &cdev->private->kick_work);
ccw_device_done(cdev, DEV_STATE_NOT_OPER); ccw_device_done(cdev, DEV_STATE_NOT_OPER);
break; break;
...@@ -713,7 +713,7 @@ ccw_device_offline_notoper(struct ccw_device *cdev, enum dev_event dev_event) ...@@ -713,7 +713,7 @@ ccw_device_offline_notoper(struct ccw_device *cdev, enum dev_event dev_event)
sch = to_subchannel(cdev->dev.parent); sch = to_subchannel(cdev->dev.parent);
if (get_device(&cdev->dev)) { if (get_device(&cdev->dev)) {
PREPARE_WORK(&cdev->private->kick_work, 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); queue_work(ccw_device_work, &cdev->private->kick_work);
} }
wake_up(&cdev->private->wait_q); wake_up(&cdev->private->wait_q);
...@@ -744,7 +744,7 @@ ccw_device_online_notoper(struct ccw_device *cdev, enum dev_event dev_event) ...@@ -744,7 +744,7 @@ ccw_device_online_notoper(struct ccw_device *cdev, enum dev_event dev_event)
} }
if (get_device(&cdev->dev)) { if (get_device(&cdev->dev)) {
PREPARE_WORK(&cdev->private->kick_work, 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); queue_work(ccw_device_work, &cdev->private->kick_work);
} }
wake_up(&cdev->private->wait_q); wake_up(&cdev->private->wait_q);
...@@ -849,7 +849,7 @@ ccw_device_online_timeout(struct ccw_device *cdev, enum dev_event dev_event) ...@@ -849,7 +849,7 @@ ccw_device_online_timeout(struct ccw_device *cdev, enum dev_event dev_event)
sch = to_subchannel(cdev->dev.parent); sch = to_subchannel(cdev->dev.parent);
if (!sch->lpm) { if (!sch->lpm) {
PREPARE_WORK(&cdev->private->kick_work, PREPARE_WORK(&cdev->private->kick_work,
ccw_device_nopath_notify, (void *)cdev); ccw_device_nopath_notify, cdev);
queue_work(ccw_device_notify_work, queue_work(ccw_device_notify_work,
&cdev->private->kick_work); &cdev->private->kick_work);
} else } else
...@@ -938,7 +938,7 @@ ccw_device_killing_irq(struct ccw_device *cdev, enum dev_event dev_event) ...@@ -938,7 +938,7 @@ ccw_device_killing_irq(struct ccw_device *cdev, enum dev_event dev_event)
ERR_PTR(-EIO)); ERR_PTR(-EIO));
if (!sch->lpm) { if (!sch->lpm) {
PREPARE_WORK(&cdev->private->kick_work, 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); queue_work(ccw_device_notify_work, &cdev->private->kick_work);
} else if (cdev->private->flags.doverify) } else if (cdev->private->flags.doverify)
/* Start delayed path verification. */ /* Start delayed path verification. */
...@@ -961,7 +961,7 @@ ccw_device_killing_timeout(struct ccw_device *cdev, enum dev_event dev_event) ...@@ -961,7 +961,7 @@ ccw_device_killing_timeout(struct ccw_device *cdev, enum dev_event dev_event)
sch = to_subchannel(cdev->dev.parent); sch = to_subchannel(cdev->dev.parent);
if (!sch->lpm) { if (!sch->lpm) {
PREPARE_WORK(&cdev->private->kick_work, PREPARE_WORK(&cdev->private->kick_work,
ccw_device_nopath_notify, (void *)cdev); ccw_device_nopath_notify, cdev);
queue_work(ccw_device_notify_work, queue_work(ccw_device_notify_work,
&cdev->private->kick_work); &cdev->private->kick_work);
} else } else
...@@ -990,7 +990,7 @@ void device_kill_io(struct subchannel *sch) ...@@ -990,7 +990,7 @@ void device_kill_io(struct subchannel *sch)
if (ret == -ENODEV) { if (ret == -ENODEV) {
if (!sch->lpm) { if (!sch->lpm) {
PREPARE_WORK(&cdev->private->kick_work, PREPARE_WORK(&cdev->private->kick_work,
ccw_device_nopath_notify, (void *)cdev); ccw_device_nopath_notify, cdev);
queue_work(ccw_device_notify_work, queue_work(ccw_device_notify_work,
&cdev->private->kick_work); &cdev->private->kick_work);
} else } else
...@@ -1002,7 +1002,7 @@ void device_kill_io(struct subchannel *sch) ...@@ -1002,7 +1002,7 @@ void device_kill_io(struct subchannel *sch)
ERR_PTR(-EIO)); ERR_PTR(-EIO));
if (!sch->lpm) { if (!sch->lpm) {
PREPARE_WORK(&cdev->private->kick_work, 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); queue_work(ccw_device_notify_work, &cdev->private->kick_work);
} else } else
/* Start delayed path verification. */ /* Start delayed path verification. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment