From: Subhash Jadavani <subhashj@codeaurora.org>
To: Tomas Winkler <tomas.winkler@intel.com>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Vinayak Holikatti <vinholikatti@gmail.com>,
Christoph Hellwig <hch@lst.de>,
Yaniv Gardi <ygardi@codeaurora.org>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-scsi-owner@vger.kernel.org
Subject: Re: [scsi] scsi: ufshcd-platform: remove the useless cast in ERR_PTR/IS_ERR
Date: Wed, 15 Mar 2017 16:01:02 -0700 [thread overview]
Message-ID: <430490a06bb568794c5ef3fe84474d82@codeaurora.org> (raw)
In-Reply-To: <20170314121936.1360-1-tomas.winkler@intel.com>
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
next prev parent reply other threads:[~2017-03-15 23:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2017-03-15 23:04 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=430490a06bb568794c5ef3fe84474d82@codeaurora.org \
--to=subhashj@codeaurora.org \
--cc=James.Bottomley@hansenpartnership.com \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi-owner@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=tomas.winkler@intel.com \
--cc=vinholikatti@gmail.com \
--cc=ygardi@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.