diff options
author | Bart Van Assche <bvanassche@acm.org> | 2021-10-20 23:40:22 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-27 05:24:50 +0200 |
commit | 3ad317a1f932f3dfdedfba405f7b2d02154e20e1 (patch) | |
tree | f47ab2971ed697c5c9add90b340a82f508b2767a /drivers/scsi | |
parent | scsi: ufs: core: Add debugfs attributes for triggering the UFS EH (diff) | |
download | linux-3ad317a1f932f3dfdedfba405f7b2d02154e20e1.tar.xz linux-3ad317a1f932f3dfdedfba405f7b2d02154e20e1.zip |
scsi: ufs: core: Remove three superfluous casts
Casting an int explicitly to u16 when passed as an argument to a function
is not necessary.
Since prd_table and ucd_prdt_ptr both have type struct ufshcd_sg_entry *,
remove the casts from assignments of these two to each other.
This patch does not change any functionality.
Link: https://lore.kernel.org/r/20211020214024.2007615-9-bvanassche@acm.org
Acked-by: Avri Altman <Avri.Altman@wdc.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/ufs/ufshcd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 0739aa566725..7ea0588247b0 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -2374,9 +2374,9 @@ static int ufshcd_map_sg(struct ufs_hba *hba, struct ufshcd_lrb *lrbp) sizeof(struct ufshcd_sg_entry))); else lrbp->utr_descriptor_ptr->prd_table_length = - cpu_to_le16((u16) (sg_segments)); + cpu_to_le16(sg_segments); - prd_table = (struct ufshcd_sg_entry *)lrbp->ucd_prdt_ptr; + prd_table = lrbp->ucd_prdt_ptr; scsi_for_each_sg(cmd, sg, sg_segments, i) { prd_table[i].size = @@ -2668,7 +2668,7 @@ static void ufshcd_init_lrb(struct ufs_hba *hba, struct ufshcd_lrb *lrb, int i) lrb->ucd_req_dma_addr = cmd_desc_element_addr; lrb->ucd_rsp_ptr = (struct utp_upiu_rsp *)cmd_descp[i].response_upiu; lrb->ucd_rsp_dma_addr = cmd_desc_element_addr + response_offset; - lrb->ucd_prdt_ptr = (struct ufshcd_sg_entry *)cmd_descp[i].prd_table; + lrb->ucd_prdt_ptr = cmd_descp[i].prd_table; lrb->ucd_prdt_dma_addr = cmd_desc_element_addr + prdt_offset; } |