scsi: ufs: core: Use scsi_get_lba() to get LBA
authorMartin K. Petersen <martin.petersen@oracle.com>
Wed, 9 Jun 2021 03:39:29 +0000 (23:39 -0400)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 21 Jul 2021 02:10:42 +0000 (22:10 -0400)
Use the scsi_get_lba() helper instead of a function internal to the
SCSI disk driver. Remove #include "sd.h".

Link: https://lore.kernel.org/r/20210609033929.3815-16-martin.petersen@oracle.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Message-Id: <20210609033929.3815-16-martin.petersen@oracle.com>

drivers/scsi/ufs/ufshcd.c

index 708b3b6..064a44e 100644 (file)
@@ -25,7 +25,6 @@
 #include "ufs_bsg.h"
 #include "ufshcd-crypto.h"
 #include <asm/unaligned.h>
-#include "../sd.h"
 
 #define CREATE_TRACE_POINTS
 #include <trace/events/ufs.h>
@@ -390,7 +389,7 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag,
        /* trace UPIU also */
        ufshcd_add_cmd_upiu_trace(hba, tag, str_t);
        opcode = cmd->cmnd[0];
-       lba = sectors_to_logical(cmd->device, blk_rq_pos(cmd->request));
+       lba = scsi_get_lba(cmd);
 
        if (opcode == READ_10 || opcode == WRITE_10) {
                /*