* [scsi] scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR
@ 2017-03-14 12:19 Tomas Winkler
2017-03-15 23:01 ` Subhash Jadavani
2017-03-15 23:04 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Tomas Winkler @ 2017-03-14 12:19 UTC (permalink / raw)
To: James Bottomley, Martin K . Petersen, Vinayak Holikatti
Cc: Christoph Hellwig, Yaniv Gardi, Subhash Jadavani, linux-scsi,
linux-kernel, Tomas Winkler
IS_ERR and ERR_PTR already forcefully cast their argument,
hence there is no need for additional (complex) casting.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
drivers/scsi/ufs/ufshcd-pltfrm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd-pltfrm.c
index a72a4ba78125..8e5e6c04c035 100644
--- a/drivers/scsi/ufs/ufshcd-pltfrm.c
+++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
@@ -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;
}
--
2.9.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [scsi] scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR
2017-03-14 12:19 [scsi] scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR Tomas Winkler
@ 2017-03-15 23:01 ` Subhash Jadavani
2017-03-15 23:04 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Subhash Jadavani @ 2017-03-15 23:01 UTC (permalink / raw)
To: Tomas Winkler
Cc: James Bottomley, Martin K . Petersen, Vinayak Holikatti,
Christoph Hellwig, Yaniv Gardi, linux-scsi, linux-kernel,
linux-scsi-owner
On 2017-03-14 05:19, Tomas Winkler wrote:
> IS_ERR and ERR_PTR already forcefully cast their argument,
> hence there is no need for additional (complex) casting.
>
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> ---
> drivers/scsi/ufs/ufshcd-pltfrm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c
> b/drivers/scsi/ufs/ufshcd-pltfrm.c
> index a72a4ba78125..8e5e6c04c035 100644
> --- a/drivers/scsi/ufs/ufshcd-pltfrm.c
> +++ b/drivers/scsi/ufs/ufshcd-pltfrm.c
> @@ -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 <subhashj@codeaurora.org>
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [scsi] scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR
2017-03-14 12:19 [scsi] scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR Tomas Winkler
2017-03-15 23:01 ` Subhash Jadavani
@ 2017-03-15 23:04 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2017-03-15 23:04 UTC (permalink / raw)
To: Tomas Winkler
Cc: James Bottomley, Martin K . Petersen, Vinayak Holikatti,
Christoph Hellwig, Yaniv Gardi, Subhash Jadavani, linux-scsi,
linux-kernel
Tomas Winkler <tomas.winkler@intel.com> writes:
> IS_ERR and ERR_PTR already forcefully cast their argument, hence there
> is no need for additional (complex) casting.
Applied to 4.11/scsi-fixes.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-15 23:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-14 12:19 [scsi] scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR Tomas Winkler
2017-03-15 23:01 ` Subhash Jadavani
2017-03-15 23:04 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).