Re: [PATCH 3/4] BNX2I: Changed the nopout_wqe->lun memcpy to use sizeof instead

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Modified the memcpy of nopout_wqe->lun to use sizeof(struct scsi_lun)
> instead of the hardcoded value 8 as noted by review comments.
>
> Signed-off-by: Eddie Wai <eddie.wai@xxxxxxxxxxxx>
> ---
>  drivers/scsi/bnx2i/bnx2i_hwi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/bnx2i/bnx2i_hwi.c
> b/drivers/scsi/bnx2i/bnx2i_hwi.c
> index 64089e2..d5f3bf6 100644
> --- a/drivers/scsi/bnx2i/bnx2i_hwi.c
> +++ b/drivers/scsi/bnx2i/bnx2i_hwi.c
> @@ -551,7 +551,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, sizeof(struct scsi_lun));
>
>  	if (test_bit(BNX2I_NX2_DEV_57710, &ep->hba->cnic_dev_type)) {
>  		u32 tmp = nopout_wqe->lun[0];

Why not just use sizeof(*nopout_wqe->lun)?

Eike
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux