On 06/23/2011 05:51 PM, Eddie Wai wrote:
> 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 <[email protected]>
> ---
>  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 2a1bb9f..ba2f96e 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];

This patch and Andy your patch "[PATCH] iscsi: Use struct scsi_lun in
iscsi structs instead of u8[8]" are going to conflict with each other.

And Eddie, I think you missed some other instances where 8 is hardcoded.

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.

Reply via email to