diff mbox series

[15/15] scsi: ufs: core: Use scsi_get_lba() to get LBA

Message ID 20210609033929.3815-16-martin.petersen@oracle.com (mailing list archive)
State Deferred
Headers show
Series Subject: Protection information and block size cleanup | expand

Commit Message

Martin K. Petersen June 9, 2021, 3:39 a.m. UTC
Use the scsi_get_lba() helper instead of a function internal to the
SCSI disk driver. Remove #include "sd.h".

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
---
 drivers/scsi/ufs/ufshcd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Bart Van Assche June 9, 2021, 7:59 p.m. UTC | #1
On 6/8/21 8:39 PM, Martin K. Petersen wrote:
> Use the scsi_get_lba() helper instead of a function internal to the
> SCSI disk driver. Remove #include "sd.h".

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index fe1b5f4b586a..beb52245554f 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -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) {
 		/*