From 8461e47a4fced3278707d5059205ef28bf95ea5e Mon Sep 17 00:00:00 2001 From: Matt Wagantall Date: Fri, 6 Mar 2015 17:14:55 -0800 Subject: [PATCH] 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 --- include/linux/msm-sps.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/msm-sps.h b/include/linux/msm-sps.h index 9a8d4647eeb8..2c188593730c 100644 --- a/include/linux/msm-sps.h +++ b/include/linux/msm-sps.h @@ -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 */