spmi: Correct pointer casting and arithmetic

Use pointer and size_t rather then size dependent code
and avoid use of casting.

Change-Id: Ie901c75ff99730830268f385a415b1199a3720a0
Signed-off-by: Gilad Avidov <gavidov@codeaurora.org>
2 files changed