linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] tpm_crb: Use IOMEM_ERR_PTR when function returns iomem
@ 2021-04-29  7:39 Tian Tao
  2021-05-03 14:50 ` Jarkko Sakkinen
  0 siblings, 1 reply; 2+ messages in thread
From: Tian Tao @ 2021-04-29  7:39 UTC (permalink / raw)
  To: jarkko, peterhuewe; +Cc: linux-integrity, Tian Tao

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>
---

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] tpm_crb: Use IOMEM_ERR_PTR when function returns iomem
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Jarkko Sakkinen @ 2021-05-03 14:50 UTC (permalink / raw)
  To: Tian Tao; +Cc: peterhuewe, linux-integrity

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
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-03 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).