Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1600283 > unrolled thread
| Started by | Tomas Winkler <tomas.winkler@intel.com> |
|---|---|
| First post | 2017-03-14 13:30 +0100 |
| Last post | 2017-03-16 00:10 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[scsi] scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR Tomas Winkler <tomas.winkler@intel.com> - 2017-03-14 13:30 +0100
Re: [scsi] scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-03-16 00:10 +0100
Re: [scsi] scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR Subhash Jadavani <subhashj@codeaurora.org> - 2017-03-16 00:10 +0100
| From | Tomas Winkler <tomas.winkler@intel.com> |
|---|---|
| Date | 2017-03-14 13:30 +0100 |
| Subject | [scsi] scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR |
| Message-ID | <tkTKp-8tD-3@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | "Martin K. Petersen" <martin.petersen@oracle.com> |
|---|---|
| Date | 2017-03-16 00:10 +0100 |
| Message-ID | <tlqdk-6eS-5@gated-at.bofh.it> |
| In reply to | #1600283 |
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
[toc] | [prev] | [next] | [standalone]
| From | Subhash Jadavani <subhashj@codeaurora.org> |
|---|---|
| Date | 2017-03-16 00:10 +0100 |
| Subject | Re: [scsi] scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR |
| Message-ID | <tlqdk-6eS-11@gated-at.bofh.it> |
| In reply to | #1600283 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web