Skip to content
Commit 24fce61b authored by Damian Hobson-Garcia's avatar Damian Hobson-Garcia Committed by Greg Kroah-Hartman
Browse files

drivers: uio_dmem_genirq: Don't mix address spaces for dynamic region vaddr



Assigning the virtual address returned from dma_alloc_coherent to the the
internal_addr element of uioinfo produces the following sparse errors since
internal_addr is a void __iomem * and dma_alloc_coherent returns void *.

+ drivers/uio/uio_dmem_genirq.c:65:39: sparse: incorrect type in assignment (different address spaces)
  drivers/uio/uio_dmem_genirq.c:65:39:    expected void [noderef] <asn:2>*internal_addr
  drivers/uio/uio_dmem_genirq.c:65:39:    got void *[assigned] addr
+ drivers/uio/uio_dmem_genirq.c:93:17: sparse: incorrect type in argument 3 (different address spaces)
  drivers/uio/uio_dmem_genirq.c:93:17:    expected void *vaddr
  drivers/uio/uio_dmem_genirq.c:93:17:    got void [noderef] <asn:2>*internal_addr

Store the void * in the driver's private data instead.

Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarDamian Hobson-Garcia <dhobsong@igel.co.jp>
Cc: "Hans J. Koch" <hjk@hansjkoch.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9b96c312
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment