提交 1f6f7129 编写于 作者: M Martin Peschke 提交者: James Bottomley

[SCSI] zfcp: fix 31 bit compile warnings

drivers/s390/scsi/zfcp_aux.c: In function ‘zfcp_fsf_incoming_els_rscn’:
drivers/s390/scsi/zfcp_aux.c:1379: warning: cast from pointer to integer of
different size
drivers/s390/scsi/zfcp_aux.c: In function ‘zfcp_fsf_incoming_els_plogi’:
drivers/s390/scsi/zfcp_aux.c:1432: warning: cast from pointer to integer of
different size
drivers/s390/scsi/zfcp_aux.c: In function ‘zfcp_fsf_incoming_els_logo’:
drivers/s390/scsi/zfcp_aux.c:1457: warning: cast from pointer to integer of
different size
..

Just passing pointers rids us of these warnings and improves readability.
Signed-off-by: NMartin Peschke <mp3@de.ibm.com>
Signed-off-by: NChristof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
上级 99773aab
......@@ -1376,7 +1376,7 @@ static void zfcp_fsf_incoming_els_rscn(struct zfcp_fsf_req *fsf_req)
"port 0x%016Lx\n", port->wwpn);
zfcp_erp_port_reopen(port,
ZFCP_STATUS_COMMON_ERP_FAILED,
82, (u64)fsf_req);
82, fsf_req);
continue;
}
......@@ -1429,7 +1429,7 @@ static void zfcp_fsf_incoming_els_plogi(struct zfcp_fsf_req *fsf_req)
status_buffer->d_id,
zfcp_get_busid_by_adapter(adapter));
} else {
zfcp_erp_port_forced_reopen(port, 0, 83, (u64)fsf_req);
zfcp_erp_port_forced_reopen(port, 0, 83, fsf_req);
}
}
......@@ -1454,7 +1454,7 @@ static void zfcp_fsf_incoming_els_logo(struct zfcp_fsf_req *fsf_req)
status_buffer->d_id,
zfcp_get_busid_by_adapter(adapter));
} else {
zfcp_erp_port_forced_reopen(port, 0, 84, (u64)fsf_req);
zfcp_erp_port_forced_reopen(port, 0, 84, fsf_req);
}
}
......
......@@ -170,9 +170,10 @@ zfcp_ccw_set_online(struct ccw_device *ccw_device)
BUG_ON(!zfcp_reqlist_isempty(adapter));
adapter->req_no = 0;
zfcp_erp_modify_adapter_status(adapter, 10, 0,
zfcp_erp_modify_adapter_status(adapter, 10, NULL,
ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET);
zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85, 0);
zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85,
NULL);
zfcp_erp_wait(adapter);
goto out;
......@@ -197,7 +198,7 @@ zfcp_ccw_set_offline(struct ccw_device *ccw_device)
down(&zfcp_data.config_sema);
adapter = dev_get_drvdata(&ccw_device->dev);
zfcp_erp_adapter_shutdown(adapter, 0, 86, 0);
zfcp_erp_adapter_shutdown(adapter, 0, 86, NULL);
zfcp_erp_wait(adapter);
zfcp_erp_thread_kill(adapter);
up(&zfcp_data.config_sema);
......@@ -223,21 +224,21 @@ zfcp_ccw_notify(struct ccw_device *ccw_device, int event)
case CIO_GONE:
ZFCP_LOG_NORMAL("adapter %s: device gone\n",
zfcp_get_busid_by_adapter(adapter));
zfcp_erp_adapter_shutdown(adapter, 0, 87, 0);
zfcp_erp_adapter_shutdown(adapter, 0, 87, NULL);
break;
case CIO_NO_PATH:
ZFCP_LOG_NORMAL("adapter %s: no path\n",
zfcp_get_busid_by_adapter(adapter));
zfcp_erp_adapter_shutdown(adapter, 0, 88, 0);
zfcp_erp_adapter_shutdown(adapter, 0, 88, NULL);
break;
case CIO_OPER:
ZFCP_LOG_NORMAL("adapter %s: operational again\n",
zfcp_get_busid_by_adapter(adapter));
zfcp_erp_modify_adapter_status(adapter, 11, 0,
zfcp_erp_modify_adapter_status(adapter, 11, NULL,
ZFCP_STATUS_COMMON_RUNNING,
ZFCP_SET);
zfcp_erp_adapter_reopen(adapter,
ZFCP_STATUS_COMMON_ERP_FAILED, 89, 0);
zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
89, NULL);
break;
}
zfcp_erp_wait(adapter);
......@@ -269,7 +270,7 @@ zfcp_ccw_shutdown(struct ccw_device *cdev)
down(&zfcp_data.config_sema);
adapter = dev_get_drvdata(&cdev->dev);
zfcp_erp_adapter_shutdown(adapter, 0, 90, 0);
zfcp_erp_adapter_shutdown(adapter, 0, 90, NULL);
zfcp_erp_wait(adapter);
up(&zfcp_data.config_sema);
}
......
......@@ -700,7 +700,7 @@ void zfcp_rec_dbf_event_thread(u8 id2, struct zfcp_adapter *adapter, int lock)
spin_unlock_irqrestore(&adapter->rec_dbf_lock, flags);
}
static void zfcp_rec_dbf_event_target(u8 id2, u64 ref,
static void zfcp_rec_dbf_event_target(u8 id2, void *ref,
struct zfcp_adapter *adapter,
atomic_t *status, atomic_t *erp_count,
u64 wwpn, u32 d_id, u64 fcp_lun)
......@@ -712,7 +712,7 @@ static void zfcp_rec_dbf_event_target(u8 id2, u64 ref,
memset(r, 0, sizeof(*r));
r->id = ZFCP_REC_DBF_ID_TARGET;
r->id2 = id2;
r->u.target.ref = ref;
r->u.target.ref = (unsigned long)ref;
r->u.target.status = atomic_read(status);
r->u.target.wwpn = wwpn;
r->u.target.d_id = d_id;
......@@ -728,7 +728,7 @@ static void zfcp_rec_dbf_event_target(u8 id2, u64 ref,
* @ref: additional reference (e.g. request)
* @adapter: adapter
*/
void zfcp_rec_dbf_event_adapter(u8 id, u64 ref, struct zfcp_adapter *adapter)
void zfcp_rec_dbf_event_adapter(u8 id, void *ref, struct zfcp_adapter *adapter)
{
zfcp_rec_dbf_event_target(id, ref, adapter, &adapter->status,
&adapter->erp_counter, 0, 0, 0);
......@@ -740,7 +740,7 @@ void zfcp_rec_dbf_event_adapter(u8 id, u64 ref, struct zfcp_adapter *adapter)
* @ref: additional reference (e.g. request)
* @port: port
*/
void zfcp_rec_dbf_event_port(u8 id, u64 ref, struct zfcp_port *port)
void zfcp_rec_dbf_event_port(u8 id, void *ref, struct zfcp_port *port)
{
struct zfcp_adapter *adapter = port->adapter;
......@@ -755,7 +755,7 @@ void zfcp_rec_dbf_event_port(u8 id, u64 ref, struct zfcp_port *port)
* @ref: additional reference (e.g. request)
* @unit: unit
*/
void zfcp_rec_dbf_event_unit(u8 id, u64 ref, struct zfcp_unit *unit)
void zfcp_rec_dbf_event_unit(u8 id, void *ref, struct zfcp_unit *unit)
{
struct zfcp_port *port = unit->port;
struct zfcp_adapter *adapter = port->adapter;
......@@ -776,8 +776,8 @@ void zfcp_rec_dbf_event_unit(u8 id, u64 ref, struct zfcp_unit *unit)
* @port: port
* @unit: unit
*/
void zfcp_rec_dbf_event_trigger(u8 id2, u64 ref, u8 want, u8 need, u64 action,
struct zfcp_adapter *adapter,
void zfcp_rec_dbf_event_trigger(u8 id2, void *ref, u8 want, u8 need,
void *action, struct zfcp_adapter *adapter,
struct zfcp_port *port, struct zfcp_unit *unit)
{
struct zfcp_rec_dbf_record *r = &adapter->rec_dbf_buf;
......@@ -787,10 +787,10 @@ void zfcp_rec_dbf_event_trigger(u8 id2, u64 ref, u8 want, u8 need, u64 action,
memset(r, 0, sizeof(*r));
r->id = ZFCP_REC_DBF_ID_TRIGGER;
r->id2 = id2;
r->u.trigger.ref = ref;
r->u.trigger.ref = (unsigned long)ref;
r->u.trigger.want = want;
r->u.trigger.need = need;
r->u.trigger.action = action;
r->u.trigger.action = (unsigned long)action;
r->u.trigger.as = atomic_read(&adapter->status);
if (port) {
r->u.trigger.ps = atomic_read(&port->status);
......@@ -819,10 +819,10 @@ void zfcp_rec_dbf_event_action(u8 id2, struct zfcp_erp_action *erp_action)
memset(r, 0, sizeof(*r));
r->id = ZFCP_REC_DBF_ID_ACTION;
r->id2 = id2;
r->u.action.action = (u64)erp_action;
r->u.action.action = (unsigned long)erp_action;
r->u.action.status = erp_action->status;
r->u.action.step = erp_action->step;
r->u.action.fsf_req = (u64)erp_action->fsf_req;
r->u.action.fsf_req = (unsigned long)erp_action->fsf_req;
debug_event(adapter->rec_dbf, 4, r, sizeof(*r));
spin_unlock_irqrestore(&adapter->rec_dbf_lock, flags);
}
......
此差异已折叠。
......@@ -131,23 +131,25 @@ extern int zfcp_scsi_command_sync(struct zfcp_unit *, struct scsi_cmnd *, int);
extern struct fc_function_template zfcp_transport_functions;
/******************************** ERP ****************************************/
extern void zfcp_erp_modify_adapter_status(struct zfcp_adapter *, u8, u64, u32,
int);
extern int zfcp_erp_adapter_reopen(struct zfcp_adapter *, int, u8, u64);
extern int zfcp_erp_adapter_shutdown(struct zfcp_adapter *, int, u8, u64);
extern void zfcp_erp_adapter_failed(struct zfcp_adapter *, u8, u64);
extern void zfcp_erp_modify_port_status(struct zfcp_port *, u8, u64, u32, int);
extern int zfcp_erp_port_reopen(struct zfcp_port *, int, u8, u64);
extern int zfcp_erp_port_shutdown(struct zfcp_port *, int, u8, u64);
extern int zfcp_erp_port_forced_reopen(struct zfcp_port *, int, u8, u64);
extern void zfcp_erp_port_failed(struct zfcp_port *, u8, u64);
extern int zfcp_erp_port_reopen_all(struct zfcp_adapter *, int, u8, u64);
extern void zfcp_erp_modify_unit_status(struct zfcp_unit *, u8, u64, u32, int);
extern int zfcp_erp_unit_reopen(struct zfcp_unit *, int, u8, u64);
extern int zfcp_erp_unit_shutdown(struct zfcp_unit *, int, u8, u64);
extern void zfcp_erp_unit_failed(struct zfcp_unit *, u8, u64);
extern void zfcp_erp_modify_adapter_status(struct zfcp_adapter *, u8, void *,
u32, int);
extern int zfcp_erp_adapter_reopen(struct zfcp_adapter *, int, u8, void *);
extern int zfcp_erp_adapter_shutdown(struct zfcp_adapter *, int, u8, void *);
extern void zfcp_erp_adapter_failed(struct zfcp_adapter *, u8, void *);
extern void zfcp_erp_modify_port_status(struct zfcp_port *, u8, void *, u32,
int);
extern int zfcp_erp_port_reopen(struct zfcp_port *, int, u8, void *);
extern int zfcp_erp_port_shutdown(struct zfcp_port *, int, u8, void *);
extern int zfcp_erp_port_forced_reopen(struct zfcp_port *, int, u8, void *);
extern void zfcp_erp_port_failed(struct zfcp_port *, u8, void *);
extern int zfcp_erp_port_reopen_all(struct zfcp_adapter *, int, u8, void *);
extern void zfcp_erp_modify_unit_status(struct zfcp_unit *, u8, void *, u32,
int);
extern int zfcp_erp_unit_reopen(struct zfcp_unit *, int, u8, void *);
extern int zfcp_erp_unit_shutdown(struct zfcp_unit *, int, u8, void *);
extern void zfcp_erp_unit_failed(struct zfcp_unit *, u8, void *);
extern int zfcp_erp_thread_setup(struct zfcp_adapter *);
extern int zfcp_erp_thread_kill(struct zfcp_adapter *);
......@@ -156,22 +158,22 @@ extern void zfcp_erp_async_handler(struct zfcp_erp_action *, unsigned long);
extern int zfcp_test_link(struct zfcp_port *);
extern void zfcp_erp_port_boxed(struct zfcp_port *, u8 id, u64 ref);
extern void zfcp_erp_unit_boxed(struct zfcp_unit *, u8 id, u64 ref);
extern void zfcp_erp_port_access_denied(struct zfcp_port *, u8 id, u64 ref);
extern void zfcp_erp_unit_access_denied(struct zfcp_unit *, u8 id, u64 ref);
extern void zfcp_erp_adapter_access_changed(struct zfcp_adapter *, u8, u64);
extern void zfcp_erp_port_access_changed(struct zfcp_port *, u8, u64);
extern void zfcp_erp_unit_access_changed(struct zfcp_unit *, u8, u64);
extern void zfcp_erp_port_boxed(struct zfcp_port *, u8 id, void *ref);
extern void zfcp_erp_unit_boxed(struct zfcp_unit *, u8 id, void *ref);
extern void zfcp_erp_port_access_denied(struct zfcp_port *, u8 id, void *ref);
extern void zfcp_erp_unit_access_denied(struct zfcp_unit *, u8 id, void *ref);
extern void zfcp_erp_adapter_access_changed(struct zfcp_adapter *, u8, void *);
extern void zfcp_erp_port_access_changed(struct zfcp_port *, u8, void *);
extern void zfcp_erp_unit_access_changed(struct zfcp_unit *, u8, void *);
/******************************** AUX ****************************************/
extern void zfcp_rec_dbf_event_thread(u8 id, struct zfcp_adapter *adapter,
int lock);
extern void zfcp_rec_dbf_event_adapter(u8 id, u64 ref, struct zfcp_adapter *);
extern void zfcp_rec_dbf_event_port(u8 id, u64 ref, struct zfcp_port *port);
extern void zfcp_rec_dbf_event_unit(u8 id, u64 ref, struct zfcp_unit *unit);
extern void zfcp_rec_dbf_event_trigger(u8 id, u64 ref, u8 want, u8 need,
u64 action, struct zfcp_adapter *,
extern void zfcp_rec_dbf_event_adapter(u8 id, void *ref, struct zfcp_adapter *);
extern void zfcp_rec_dbf_event_port(u8 id, void *ref, struct zfcp_port *port);
extern void zfcp_rec_dbf_event_unit(u8 id, void *ref, struct zfcp_unit *unit);
extern void zfcp_rec_dbf_event_trigger(u8 id, void *ref, u8 want, u8 need,
void *action, struct zfcp_adapter *,
struct zfcp_port *, struct zfcp_unit *);
extern void zfcp_rec_dbf_event_action(u8 id, struct zfcp_erp_action *);
......
此差异已折叠。
......@@ -176,7 +176,8 @@ zfcp_qdio_handler_error_check(struct zfcp_adapter *adapter, unsigned int status,
*/
zfcp_erp_adapter_reopen(adapter,
ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED |
ZFCP_STATUS_COMMON_ERP_FAILED, 140, 0);
ZFCP_STATUS_COMMON_ERP_FAILED, 140,
NULL);
}
return retval;
}
......
......@@ -185,7 +185,7 @@ static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt)
atomic_clear_mask(ZFCP_STATUS_UNIT_REGISTERED, &unit->status);
sdpnt->hostdata = NULL;
unit->device = NULL;
zfcp_erp_unit_failed(unit, 12, 0);
zfcp_erp_unit_failed(unit, 12, NULL);
zfcp_unit_put(unit);
} else
ZFCP_LOG_NORMAL("bug: no unit associated with SCSI device at "
......@@ -529,7 +529,7 @@ static int zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt)
unit->fcp_lun, unit->port->wwpn,
zfcp_get_busid_by_adapter(unit->port->adapter));
zfcp_erp_adapter_reopen(adapter, 0, 141, (u64)scpnt);
zfcp_erp_adapter_reopen(adapter, 0, 141, scpnt);
zfcp_erp_wait(adapter);
return SUCCESS;
......
......@@ -89,7 +89,7 @@ zfcp_sysfs_port_add_store(struct device *dev, struct device_attribute *attr, con
retval = 0;
zfcp_erp_port_reopen(port, 0, 91, 0);
zfcp_erp_port_reopen(port, 0, 91, NULL);
zfcp_erp_wait(port->adapter);
zfcp_port_put(port);
out:
......@@ -147,7 +147,7 @@ zfcp_sysfs_port_remove_store(struct device *dev, struct device_attribute *attr,
goto out;
}
zfcp_erp_port_shutdown(port, 0, 92, 0);
zfcp_erp_port_shutdown(port, 0, 92, NULL);
zfcp_erp_wait(adapter);
zfcp_port_put(port);
zfcp_port_dequeue(port);
......@@ -191,9 +191,10 @@ zfcp_sysfs_adapter_failed_store(struct device *dev, struct device_attribute *att
goto out;
}
zfcp_erp_modify_adapter_status(adapter, 44, 0,
zfcp_erp_modify_adapter_status(adapter, 44, NULL,
ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET);
zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 93, 0);
zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 93,
NULL);
zfcp_erp_wait(adapter);
out:
up(&zfcp_data.config_sema);
......
......@@ -94,7 +94,7 @@ zfcp_sysfs_unit_add_store(struct device *dev, struct device_attribute *attr, con
retval = 0;
zfcp_erp_unit_reopen(unit, 0, 94, 0);
zfcp_erp_unit_reopen(unit, 0, 94, NULL);
zfcp_erp_wait(unit->port->adapter);
zfcp_unit_put(unit);
out:
......@@ -150,7 +150,7 @@ zfcp_sysfs_unit_remove_store(struct device *dev, struct device_attribute *attr,
goto out;
}
zfcp_erp_unit_shutdown(unit, 0, 95, 0);
zfcp_erp_unit_shutdown(unit, 0, 95, NULL);
zfcp_erp_wait(unit->port->adapter);
zfcp_unit_put(unit);
zfcp_unit_dequeue(unit);
......@@ -193,9 +193,9 @@ zfcp_sysfs_port_failed_store(struct device *dev, struct device_attribute *attr,
goto out;
}
zfcp_erp_modify_port_status(port, 45, 0,
zfcp_erp_modify_port_status(port, 45, NULL,
ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET);
zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, 96, 0);
zfcp_erp_port_reopen(port, ZFCP_STATUS_COMMON_ERP_FAILED, 96, NULL);
zfcp_erp_wait(port->adapter);
out:
up(&zfcp_data.config_sema);
......
......@@ -94,9 +94,9 @@ zfcp_sysfs_unit_failed_store(struct device *dev, struct device_attribute *attr,
goto out;
}
zfcp_erp_modify_unit_status(unit, 46, 0,
zfcp_erp_modify_unit_status(unit, 46, NULL,
ZFCP_STATUS_COMMON_RUNNING, ZFCP_SET);
zfcp_erp_unit_reopen(unit, ZFCP_STATUS_COMMON_ERP_FAILED, 97, 0);
zfcp_erp_unit_reopen(unit, ZFCP_STATUS_COMMON_ERP_FAILED, 97, NULL);
zfcp_erp_wait(unit->port->adapter);
out:
up(&zfcp_data.config_sema);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册