From 642f149031d70415d9318b919d50b71e4724adbd Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 24 Oct 2007 11:20:47 +0200 Subject: SG: Change sg_set_page() to take length and offset argument Most drivers need to set length and offset as well, so may as well fold those three lines into one. Add sg_assign_page() for those two locations that only needed to set the page, where the offset/length is set outside of the function context. Signed-off-by: Jens Axboe --- drivers/s390/scsi/zfcp_erp.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'drivers/s390/scsi/zfcp_erp.c') diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 9438d0b28799..5552b755c08a 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -322,9 +322,9 @@ zfcp_erp_adisc(struct zfcp_port *port) if (address == NULL) goto nomem; - zfcp_address_to_sg(address, send_els->req); + zfcp_address_to_sg(address, send_els->req, sizeof(struct zfcp_ls_adisc)); address += PAGE_SIZE >> 1; - zfcp_address_to_sg(address, send_els->resp); + zfcp_address_to_sg(address, send_els->resp, sizeof(struct zfcp_ls_adisc_acc)); send_els->req_count = send_els->resp_count = 1; send_els->adapter = adapter; @@ -336,9 +336,6 @@ zfcp_erp_adisc(struct zfcp_port *port) adisc = zfcp_sg_to_address(send_els->req); send_els->ls_code = adisc->code = ZFCP_LS_ADISC; - send_els->req->length = sizeof(struct zfcp_ls_adisc); - send_els->resp->length = sizeof(struct zfcp_ls_adisc_acc); - /* acc. to FC-FS, hard_nport_id in ADISC should not be set for ports without FC-AL-2 capability, so we don't set it */ adisc->wwpn = fc_host_port_name(adapter->scsi_host); -- cgit v1.2.3