Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1425164

[PATCH 2/2] tpm_crb: fix address space of the return pointer in crb_map_res()

From Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] tpm_crb: fix address space of the return pointer in crb_map_res()
Date 2016-06-17 16:50 +0200
Message-ID <rL3fP-7LV-3@gated-at.bofh.it> (permalink)
References <rL369-7I5-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


When running make C=2 M=drivers/char/tpm/

  CHECK   drivers/char/tpm//tpm_crb.c
drivers/char/tpm//tpm_crb.c:248:31: warning: incorrect type in return expression (different address spaces)
drivers/char/tpm//tpm_crb.c:248:31:    expected void [noderef] <asn:2>*
drivers/char/tpm//tpm_crb.c:248:31:    got void *

Fixes: 1bd047be37d9 ("tpm_crb: Use devm_ioremap_resource")
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
---
 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 1547636..1b8e1b5 100644
--- a/drivers/char/tpm/tpm_crb.c
+++ b/drivers/char/tpm/tpm_crb.c
@@ -245,7 +245,7 @@ static void __iomem *crb_map_res(struct device *dev, struct crb_priv *priv,
 
 	/* Detect a 64 bit address on a 32 bit system */
 	if (start != new_res.start)
-		return ERR_PTR(-EINVAL);
+		return (void __iomem *) ERR_PTR(-EINVAL);
 
 	if (!resource_contains(io_res, &new_res))
 		return devm_ioremap_resource(dev, &new_res);
-- 
2.7.4

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] Fixes for sparse reported warnings Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-06-17 16:40 +0200
  [PATCH 2/2] tpm_crb: fix address space of the return pointer in crb_map_res() Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-06-17 16:50 +0200
    Re: [PATCH 2/2] tpm_crb: fix address space of the return pointer in  crb_map_res() Stefan Berger <stefanb@linux.vnet.ibm.com> - 2016-06-17 16:50 +0200
  Re: [PATCH 0/2] Fixes for sparse reported warnings Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-06-18 14:30 +0200

csiph-web