Re: [PATCH 4/7] iscsi: Use scsi_get_pos() instead of scsi_get_lba()

Lee Duncan
2021-05-10T01:14:21Z

On 5/9/21 2:43 PM, Bart Van Assche wrote:
> Use scsi_get_pos() instead of scsi_get_lba() since the name of the latter
> is confusing. Additionally, use lower_32_bits() instead of open-coding it.
> This patch does not change any functionality.
>
> Cc: Lee Duncan <lduncan@suse.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
> drivers/scsi/isci/request.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
> index e7c6cb4c1556..1c25f28385fd 100644
> --- a/drivers/scsi/isci/request.c
> +++ b/drivers/scsi/isci/request.c
> @@ -341,7 +341,7 @@ static void scu_ssp_ireq_dif_insert(struct isci_request *ireq, u8 type, u8 op)
> tc->reserved_E8_0 = 0;
>
> if ((type & SCSI_PROT_DIF_TYPE1) || (type & SCSI_PROT_DIF_TYPE2))
> - tc->ref_tag_seed_gen = scsi_get_lba(scmd) & 0xffffffff;
> + tc->ref_tag_seed_gen = lower_32_bits(scsi_get_pos(scmd));
> else if (type & SCSI_PROT_DIF_TYPE3)
> tc->ref_tag_seed_gen = 0;
> }
> @@ -369,7 +369,7 @@ static void scu_ssp_ireq_dif_strip(struct isci_request *ireq, u8 type, u8 op)
> tc->app_tag_gen = 0;
>
> if ((type & SCSI_PROT_DIF_TYPE1) || (type & SCSI_PROT_DIF_TYPE2))
> - tc->ref_tag_seed_verify = scsi_get_lba(scmd) & 0xffffffff;
> + tc->ref_tag_seed_verify = lower_32_bits(scsi_get_pos(scmd));
> else if (type & SCSI_PROT_DIF_TYPE3)
> tc->ref_tag_seed_verify = 0;
>
>

Reviewed-by: Lee Duncan <lduncan@suse.com>