msm: sps: Make DESC_FULL_ADDR(flags, addr) provide a phys_addr_t result

By convention, both the 'flags' and 'addr' arguments passed to
DESC_FULL_ADDR() come from struct sps_iovec, and so neither of
these values are 64 bit types. To guarantee that the result of
DESC_FULL_ADDR() is large enough to contain at 64 bit address,
add an explicit phys_addr_t cast inside the macro.

Change-Id: Ie1f0ba15448e4386761e60ea22251ceca246d86a
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
This commit is contained in:
Matt Wagantall 2015-03-06 17:14:55 -08:00 committed by Gerrit - the friendly Code Review server
parent 3cf1ef889e
commit 8461e47a4f

View file

@ -24,7 +24,7 @@
/* Returns 36bits physical address from 32bit address &
* flags word */
#define DESC_FULL_ADDR(flags, addr) (((flags & 0xF) << 32) | addr)
#define DESC_FULL_ADDR(flags, addr) ((((phys_addr_t)flags & 0xF) << 32) | addr)
/* Returns flags word with flags and 4bit upper address
* from flags and 36bit physical address */