diff options
author | Aaron Durbin <adurbin@chromium.org> | 2019-11-08 09:51:15 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-11-11 10:27:47 +0000 |
commit | b1ea53d846b865d5fa1332fb2e31d0f2865a7fc0 (patch) | |
tree | 203e768091dec397f86f5347fe238a26a382efee /src/lib/region_file.c | |
parent | f0564a9c44b79e9bfb1001f887348a653f7b7d56 (diff) |
region: add rdev_chain_full()
Instead of open coding an offset of 0 and querying the size of a
region device provide a rdev_chain_full() helper function that
does that for the caller. For the existing users that match this pattern
convert them to using rdev_chain_full().
Change-Id: Ie316790a8a5b16a7f7e22f86f58bd2e633c19450
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36683
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/lib/region_file.c')
-rw-r--r-- | src/lib/region_file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/region_file.c b/src/lib/region_file.c index e42c2afd1e..05d619c9a4 100644 --- a/src/lib/region_file.c +++ b/src/lib/region_file.c @@ -208,7 +208,7 @@ int region_file_init(struct region_file *f, const struct region_device *p) f->slot = RF_FATAL; /* Keep parent around for accessing data later. */ - if (rdev_chain(&f->rdev, p, 0, region_device_sz(p))) + if (rdev_chain_full(&f->rdev, p)) return -1; if (rdev_readat(p, &mb, 0, sizeof(mb)) < 0) { |