From 02103e34d76c12b46b57143cd11d96758219423d Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 14 Dec 2017 15:22:04 -0700 Subject: commonlib/region: expose subregion helper function Export region_is_subregion() for determinig if a region is a child of a parent region. BUG=b:69614064 Change-Id: I6363fe4fdb33342f9d025a726ec7e17e87adf7e0 Signed-off-by: Aaron Durbn Reviewed-on: https://review.coreboot.org/22878 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/commonlib/include/commonlib/region.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/commonlib/include') diff --git a/src/commonlib/include/commonlib/region.h b/src/commonlib/include/commonlib/region.h index 3f7d3bd52f..45484dddd6 100644 --- a/src/commonlib/include/commonlib/region.h +++ b/src/commonlib/include/commonlib/region.h @@ -112,6 +112,9 @@ void region_device_init(struct region_device *rdev, const struct region_device_ops *ops, size_t offset, size_t size); +/* Return 1 if child is subregion of parent, else 0. */ +int region_is_subregion(const struct region *p, const struct region *c); + static inline size_t region_offset(const struct region *r) { return r->offset; -- cgit v1.2.3