Commit 9b309213 authored by Lokesh Vutla's avatar Lokesh Vutla Committed by Suman Anna
Browse files

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: default avatarLokesh Vutla <lokeshvutla@ti.com>
[s-anna@ti.com: revise commit description slightly]
Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
parent 04cc0828
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment