diff options
author | Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com> | 2015-10-18 19:57:09 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-19 04:00:36 +0200 |
commit | 525d12f27bb05c4255857849a8d28c0c086bd28e (patch) | |
tree | caa130f6ce3f3b56aeec0da5df0cc0d2f09ba81b /drivers | |
parent | coresight: etm3x: adding documentation for sysFS's cpu interface (diff) | |
download | linux-525d12f27bb05c4255857849a8d28c0c086bd28e.tar.xz linux-525d12f27bb05c4255857849a8d28c0c086bd28e.zip |
misc: sram: partition base address belongs to __iomem space
The change fixes a warning found by sparse:
drivers/misc/sram.c:134:20: warning: incorrect type in assignment (different address spaces)
drivers/misc/sram.c:134:20: expected void *base
drivers/misc/sram.c:134:20: got void [noderef] <asn:2>*
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/sram.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c index b0b5e9430bfe..736dae715dbf 100644 --- a/drivers/misc/sram.c +++ b/drivers/misc/sram.c @@ -29,7 +29,7 @@ #define SRAM_GRANULARITY 32 struct sram_partition { - void *base; + void __iomem *base; struct gen_pool *pool; struct bin_attribute battr; @@ -65,7 +65,7 @@ static ssize_t sram_read(struct file *filp, struct kobject *kobj, part = container_of(attr, struct sram_partition, battr); mutex_lock(&part->lock); - memcpy(buf, part->base + pos, count); + memcpy_fromio(buf, part->base + pos, count); mutex_unlock(&part->lock); return count; @@ -80,7 +80,7 @@ static ssize_t sram_write(struct file *filp, struct kobject *kobj, part = container_of(attr, struct sram_partition, battr); mutex_lock(&part->lock); - memcpy(part->base + pos, buf, count); + memcpy_toio(part->base + pos, buf, count); mutex_unlock(&part->lock); return count; |