region: publicize region_end() and add region_device_end()
Provide region_device_end() and make region_end() publically available for use to match a pattern of open coding the offset + size calculation for both struct region and struct region_device. Apply the use of the helpers where the usage matches in the code. Change-Id: Iaef5d007eef9a77f7f33b0e89298abef0197352d Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36689 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Patrick Georgi
parent
b1ea53d846
commit
56aeae0400
@ -15,11 +15,6 @@
|
||||
#include <commonlib/region.h>
|
||||
#include <string.h>
|
||||
|
||||
static inline size_t region_end(const struct region *r)
|
||||
{
|
||||
return region_sz(r) + region_offset(r);
|
||||
}
|
||||
|
||||
int region_is_subregion(const struct region *p, const struct region *c)
|
||||
{
|
||||
if (region_offset(c) < region_offset(p))
|
||||
|
Reference in New Issue
Block a user