3cf37bbfbc
There are for loops to do these calculations for vhost session memory region. we can inline these for both in vhost_session_mem_register and vhost_session_mem_unregister. It not only removed the duplicated codes but also reduced the stack consumption. Signed-off-by: dongx.yi <dongx.yi@intel.com> Change-Id: Idb9f5ea13e09aef6b24fa27a2bb809b15ece50e2 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478820 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>