All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Tian Tao <tiantao6@hisilicon.com>
Cc: peterhuewe@gmx.de, linux-integrity@vger.kernel.org
Subject: Re: [PATCH v2] tpm_crb: Use IOMEM_ERR_PTR when function returns iomem
Date: Mon, 3 May 2021 17:50:11 +0300	[thread overview]
Message-ID: <YJANo9Jq5/dgHIn6@kernel.org> (raw)
In-Reply-To: <1619681979-542-1-git-send-email-tiantao6@hisilicon.com>

On Thu, Apr 29, 2021 at 03:39:39PM +0800, Tian Tao wrote:
> This is to simplify the code, and IOMEM_ERR_PTR(err) is same with
> (__force void __iomem *)ERR_PTR(err).
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>

Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>

/Jarkko

> ---
> 
> v2: rewrite the commit message.
> ---
>  drivers/char/tpm/tpm_crb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
> index a9dcf31..1860665 100644
> --- a/drivers/char/tpm/tpm_crb.c
> +++ b/drivers/char/tpm/tpm_crb.c
> @@ -464,7 +464,7 @@ static void __iomem *crb_map_res(struct device *dev, struct resource *iores,
>  
>  	/* Detect a 64 bit address on a 32 bit system */
>  	if (start != new_res.start)
> -		return (void __iomem *) ERR_PTR(-EINVAL);
> +		return IOMEM_ERR_PTR(-EINVAL);
>  
>  	if (!iores)
>  		return devm_ioremap_resource(dev, &new_res);
> -- 
> 2.7.4
> 
> 

      reply	other threads:[~2021-05-03 14:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-29  7:39 [PATCH v2] tpm_crb: Use IOMEM_ERR_PTR when function returns iomem Tian Tao
2021-05-03 14:50 ` Jarkko Sakkinen [this message]

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=YJANo9Jq5/dgHIn6@kernel.org \
    --to=jarkko@kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=tiantao6@hisilicon.com \
    /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.