scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR
IS_ERR and ERR_PTR already forcefully cast their argument, hence there is no need for additional (complex) casting.
Signed-off-by Tomas Winkler <[email protected]>
--- drivers/scsi/ufs/ufshcd-pltfrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/ufs/ufshcd-pltfrm.c +2 -2
@@ -309,8 +309,8 @@ int ufshcd_pltfrm_init(struct platform_device *pdev, mem_res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); mmio_base =devm_ioremap_resource (dev, mem_res); -if (IS_ERR (*(void **)&mmio_base)) { - err =PTR_ERR (*(void **)&mmio_base); +if (IS_ERR (mmio_base)) { + err =PTR_ERR (mmio_base); goto out; }
Signature · 1 line
2.9.3
Subhash Jadavani
Reviewed-byQuoted 13 lines · Tomas Winkler
IS_ERRandERR_PTRalready forcefully cast their argument, hence there is no need for additional (complex) casting.Signed-off-by Tomas Winkler <[email protected]>--- drivers/scsi/ufs/ufshcd-pltfrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/scsi/ufs/ufshcd-pltfrm.c +0
-0
drivers/scsi/ufs/ufshcd-pltfrm.c int ufshcd_pltfrm_init(struct platform_device · line 316
Quoted 10 lines
drivers/scsi/ufs/ufshcd-pltfrm.c +2
-2@@ -309,8 +309,8 @@ int ufshcd_pltfrm_init(struct platform_device *pdev, mem_res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); mmio_base =devm_ioremap_resource (dev, mem_res); -if (IS_ERR (*(void **)&mmio_base)) { - err =PTR_ERR (*(void **)&mmio_base); +if (IS_ERR (mmio_base)) { + err =PTR_ERR (mmio_base); goto out; }
LGTM.
Reviewed-by Subhash Jadavani <[email protected]>
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Martin K. Petersen
AppliedQuoted 2 lines · Tomas Winkler
IS_ERRandERR_PTRalready forcefully cast their argument, hence there is no need for additional (complex) casting.
Applied to 4.11/scsi-fixes.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering