rpmsg: rpc: fix the definition of virt_addr_t
The current rpmsg_rpc code uses the type virt_addr_t for variables storing the MPU virtual addresses of buffers (either kernel-mapped addresses or userspace buffer addresses). This type is conditionally defined to be 64-bit relying on the macro CONFIG_PHYS_ADDR_T_64BIT. Even though the physical memory available is addressed using 64 bit, it is not necessary that 64 bit virtual addresses are being generated. A 32-bit processor always generates a 32 bit virtual address, and therefore this definition is wrong. Fix it by making it always a u32, as we currently support only 32-bit virtual addresses. This fixes a bunch of build warnings [1] of the type "cast to pointer from integer of different size [-Wint-to-pointer-cast]" and "cast from pointer to integer of different size [-Wpointer-to-int-cast]" when CONFIG_ARM_LPAE is enabled. [1] http://pastebin.ubuntu.com/13494230/ Fixes: 1c80c707 ("rpmsg: rpc: introduce a new rpmsg_rpc driver") Signed-off-by:Lokesh Vutla <lokeshvutla@ti.com> [s-anna@ti.com: revise commit description slightly] Signed-off-by:
Suman Anna <s-anna@ti.com>
Loading
Please sign in to comment