From: Kent Yoder <key@linux.vnet.ibm.com>
To: James Morris <jmorris@namei.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
tpmdd-devel@lists.sourceforge.net,
kernel-janitors@vger.kernel.org,
Fengguang Wu <fengguang.wu@intel.com>
Subject: [PATCH] tpm: fix tpm_acpi sparse warning on different address spaces
Date: Tue, 04 Sep 2012 16:18:21 +0000 [thread overview]
Message-ID: <20120904161819.GB20588@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120902163030.GB1840@mwanda>
acpi_os_map_memory expects its return value to be in the __iomem address
space. Tag the variable we're using as such and use memcpy_fromio to
avoid further sparse warnings.
Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
---
drivers/char/tpm/tpm_acpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm_acpi.c b/drivers/char/tpm/tpm_acpi.c
index fe3fa94..56051d0 100644
--- a/drivers/char/tpm/tpm_acpi.c
+++ b/drivers/char/tpm/tpm_acpi.c
@@ -49,7 +49,7 @@ int read_log(struct tpm_bios_log *log)
{
struct acpi_tcpa *buff;
acpi_status status;
- struct acpi_table_header *virt;
+ void __iomem *virt;
u64 len, start;
if (log->bios_event_log != NULL) {
@@ -102,7 +102,7 @@ int read_log(struct tpm_bios_log *log)
return -EIO;
}
- memcpy(log->bios_event_log, virt, len);
+ memcpy_fromio(log->bios_event_log, virt, len);
acpi_os_unmap_memory(virt, len);
return 0;
--
1.7.11.4
WARNING: multiple messages have this Message-ID (diff)
From: Kent Yoder <key@linux.vnet.ibm.com>
To: James Morris <jmorris@namei.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
tpmdd-devel@lists.sourceforge.net,
kernel-janitors@vger.kernel.org,
Fengguang Wu <fengguang.wu@intel.com>
Subject: [PATCH] tpm: fix tpm_acpi sparse warning on different address spaces
Date: Tue, 4 Sep 2012 11:18:21 -0500 [thread overview]
Message-ID: <20120904161819.GB20588@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120902163030.GB1840@mwanda>
acpi_os_map_memory expects its return value to be in the __iomem address
space. Tag the variable we're using as such and use memcpy_fromio to
avoid further sparse warnings.
Signed-off-by: Kent Yoder <key@linux.vnet.ibm.com>
---
drivers/char/tpm/tpm_acpi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm_acpi.c b/drivers/char/tpm/tpm_acpi.c
index fe3fa94..56051d0 100644
--- a/drivers/char/tpm/tpm_acpi.c
+++ b/drivers/char/tpm/tpm_acpi.c
@@ -49,7 +49,7 @@ int read_log(struct tpm_bios_log *log)
{
struct acpi_tcpa *buff;
acpi_status status;
- struct acpi_table_header *virt;
+ void __iomem *virt;
u64 len, start;
if (log->bios_event_log != NULL) {
@@ -102,7 +102,7 @@ int read_log(struct tpm_bios_log *log)
return -EIO;
}
- memcpy(log->bios_event_log, virt, len);
+ memcpy_fromio(log->bios_event_log, virt, len);
acpi_os_unmap_memory(virt, len);
return 0;
--
1.7.11.4
next prev parent reply other threads:[~2012-09-04 16:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-30 14:38 [PATCH] tpm: fix tpm_acpi sparse warning on different address spaces Kent Yoder
2012-08-30 14:38 ` Kent Yoder
2012-08-30 17:45 ` Dan Carpenter
2012-08-30 17:45 ` Dan Carpenter
2012-08-30 19:21 ` Kent Yoder
2012-08-30 19:21 ` Kent Yoder
2012-09-02 16:30 ` Dan Carpenter
2012-09-02 16:30 ` Dan Carpenter
2012-09-04 16:13 ` Kent Yoder
2012-09-04 16:13 ` Kent Yoder
2012-09-04 16:18 ` Kent Yoder [this message]
2012-09-04 16:18 ` Kent Yoder
2012-09-12 3:12 ` James Morris
2012-09-12 3:12 ` James Morris
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=20120904161819.GB20588@linux.vnet.ibm.com \
--to=key@linux.vnet.ibm.com \
--cc=dan.carpenter@oracle.com \
--cc=fengguang.wu@intel.com \
--cc=jmorris@namei.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=tpmdd-devel@lists.sourceforge.net \
/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.