[0/3] memory-device: refine memory_device_get_free_addr
mbox series

Message ID 20190728131304.1282-1-richardw.yang@linux.intel.com
Headers show
  • memory-device: refine memory_device_get_free_addr
Related show


Wei Yang July 28, 2019, 1:13 p.m. UTC
When we iterate the memory-device list to get the available range, it is not
necessary to iterate the whole list.

1) the first non-overlap range is the proper one if no hint is provided
2) no more overlap for hinted range if tmp exceed it

Wei Yang (3):
  memory-device: not necessary to use goto for the last check
  memory-device: break the loop if no hint is provided
  memory-device: break the loop if tmp exceed the hinted range

 hw/mem/memory-device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)