You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[SCSI] iscsi: Use struct scsi_lun in iscsi structs instead of u8[8]
struct scsi_lun is also just a struct with an array of 8 octets (64 bits) but using it instead in iscsi structs lets us call scsilun_to_int without a cast, and also lets us copy it using assignment, instead of memcpy(). Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
committed by
James Bottomley
parent
2e00d24e7e
commit
516f43a2a5
@@ -430,7 +430,7 @@ int bnx2i_send_iscsi_tmf(struct bnx2i_conn *bnx2i_conn,
|
||||
default:
|
||||
tmfabort_wqe->ref_itt = RESERVED_ITT;
|
||||
}
|
||||
memcpy(scsi_lun, tmfabort_hdr->lun, sizeof(struct scsi_lun));
|
||||
memcpy(scsi_lun, &tmfabort_hdr->lun, sizeof(struct scsi_lun));
|
||||
tmfabort_wqe->lun[0] = be32_to_cpu(scsi_lun[0]);
|
||||
tmfabort_wqe->lun[1] = be32_to_cpu(scsi_lun[1]);
|
||||
|
||||
@@ -547,7 +547,7 @@ int bnx2i_send_iscsi_nopout(struct bnx2i_conn *bnx2i_conn,
|
||||
|
||||
nopout_wqe->op_code = nopout_hdr->opcode;
|
||||
nopout_wqe->op_attr = ISCSI_FLAG_CMD_FINAL;
|
||||
memcpy(nopout_wqe->lun, nopout_hdr->lun, 8);
|
||||
memcpy(nopout_wqe->lun, &nopout_hdr->lun, 8);
|
||||
|
||||
if (test_bit(BNX2I_NX2_DEV_57710, &ep->hba->cnic_dev_type)) {
|
||||
u32 tmp = nopout_wqe->lun[0];
|
||||
@@ -1711,7 +1711,7 @@ static int bnx2i_process_nopin_mesg(struct iscsi_session *session,
|
||||
hdr->flags = ISCSI_FLAG_CMD_FINAL;
|
||||
hdr->itt = task->hdr->itt;
|
||||
hdr->ttt = cpu_to_be32(nop_in->ttt);
|
||||
memcpy(hdr->lun, nop_in->lun, 8);
|
||||
memcpy(&hdr->lun, nop_in->lun, 8);
|
||||
}
|
||||
done:
|
||||
__iscsi_complete_pdu(conn, (struct iscsi_hdr *)hdr, NULL, 0);
|
||||
@@ -1754,7 +1754,7 @@ static void bnx2i_process_async_mesg(struct iscsi_session *session,
|
||||
resp_hdr->opcode = async_cqe->op_code;
|
||||
resp_hdr->flags = 0x80;
|
||||
|
||||
memcpy(resp_hdr->lun, async_cqe->lun, 8);
|
||||
memcpy(&resp_hdr->lun, async_cqe->lun, 8);
|
||||
resp_hdr->exp_cmdsn = cpu_to_be32(async_cqe->exp_cmd_sn);
|
||||
resp_hdr->max_cmdsn = cpu_to_be32(async_cqe->max_cmd_sn);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user