lkml.org 
[lkml]   [2020]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v8 4/4] scsi: ufs: Prepare HPB read for cached sub-region
From
Date
On 2020-08-06 02:18, Daejun Park wrote:
> +static inline u32 ufshpb_get_lpn(struct scsi_cmnd *cmnd)
> +{
> + return blk_rq_pos(cmnd->request) >>
> + (ilog2(cmnd->device->sector_size) - 9);
> +}

Please use sectors_to_logical() from drivers/scsi/sd.h instead of open-coding
that function.

> +static inline unsigned int ufshpb_get_len(struct scsi_cmnd *cmnd)
> +{
> + return blk_rq_sectors(cmnd->request) >>
> + (ilog2(cmnd->device->sector_size) - 9);
> +}

Same comment here.

> +/* routine : READ10 -> HPB_READ */

Please expand this comment.

Thanks,

Bart.

\
 
 \ /
  Last update: 2020-08-09 02:36    [W:0.200 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site