Prepare for removal of the request pointer by using blk_req() instead. This patch does not change any functionality. Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> --- drivers/scsi/ufs/ufshcd.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index ab707a2c3796..18d8e48e739a 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -387,16 +387,16 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, unsigned int tag, * Currently we only fully trace read(10) and write(10) * commands */ - if (cmd->request && cmd->request->bio) - lba = cmd->request->bio->bi_iter.bi_sector; + if (blk_req(cmd) && blk_req(cmd)->bio) + lba = blk_req(cmd)->bio->bi_iter.bi_sector; transfer_len = be32_to_cpu( lrbp->ucd_req_ptr->sc.exp_data_transfer_len); if (opcode == WRITE_10) group_id = lrbp->cmd->cmnd[6]; } else if (opcode == UNMAP) { - if (cmd->request) { + if (blk_req(cmd)) { lba = scsi_get_lba(cmd); - transfer_len = blk_rq_bytes(cmd->request); + transfer_len = blk_rq_bytes(blk_req(cmd)); } } } @@ -2617,11 +2617,11 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) hba = shost_priv(host); - tag = cmd->request->tag; + tag = blk_req(cmd)->tag; if (!ufshcd_valid_tag(hba, tag)) { dev_err(hba->dev, - "%s: invalid command tag %d: cmd=0x%p, cmd->request=0x%p", - __func__, tag, cmd, cmd->request); + "%s: invalid command tag %d: cmd=0x%p, blk_req=0x%p", + __func__, tag, cmd, blk_req(cmd)); BUG(); } @@ -2656,7 +2656,7 @@ static int ufshcd_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd) lrbp->lun = ufshcd_scsi_to_upiu_lun(cmd->device->lun); lrbp->intr_cmd = !ufshcd_is_intr_aggr_allowed(hba) ? true : false; - ufshcd_prepare_lrbp_crypto(cmd->request, lrbp); + ufshcd_prepare_lrbp_crypto(blk_req(cmd), lrbp); lrbp->req_abort_skip = false; @@ -6903,12 +6903,12 @@ static int ufshcd_abort(struct scsi_cmnd *cmd) host = cmd->device->host; hba = shost_priv(host); - tag = cmd->request->tag; + tag = blk_req(cmd)->tag; lrbp = &hba->lrb[tag]; if (!ufshcd_valid_tag(hba, tag)) { dev_err(hba->dev, - "%s: invalid command tag %d: cmd=0x%p, cmd->request=0x%p", - __func__, tag, cmd, cmd->request); + "%s: invalid command tag %d: cmd=0x%p, blk_req=0x%p", + __func__, tag, cmd, blk_req(cmd)); BUG(); }