pci: add helper functions to check ranges overlap.
authorIsaku Yamahata <yamahata@valinux.co.jp>
Fri, 30 Oct 2009 12:21:19 +0000 (21:21 +0900)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 9 Nov 2009 14:43:09 +0000 (08:43 -0600)
commitf49db805a978015936f40ad5ba859181def8acbe
tree422c283fa6e076f8e24a3a0d5c242bb00855566f
parenta9f49946113262f9449890ed918ab99ef73dace8
pci: add helper functions to check ranges overlap.

add helper function to check ranges overlap suggested by
Michael S. Tsirkin <mst@redhat.com>.
His original suggestion was to use [first, last], however I chosen
to use offset, length pair, i.e. [offset, offset + length)
because pci configuration space related functions all uses offset and length
pair, so it helps to avoid to type constant twice.

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/pci.h