mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
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>
This commit is contained in:
committed by
Martin K. Petersen
parent
7340faae94
commit
3ad317a1f9
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user