Merge 4.16

Change-Id: I11db70a8e25a6656c5ec640a703e7b06d5a3672e
This commit is contained in:
Jeremy Soller
2022-03-04 07:19:45 -07:00
parent af64e5d166
commit d97e25ac13
3138 changed files with 317025 additions and 23253 deletions

View File

@@ -14,30 +14,30 @@ static void test_region(void **state)
assert_true(VAL(5) + VAL(10) > VAL(10));
assert_true(VAL(7) + VAL(10) < VAL(10));
struct region outer = { .offset = VAL(2), .size = VAL(4) };
struct region outer = {.offset = VAL(2), .size = VAL(4)};
assert_int_equal(region_offset(&outer), VAL(2));
assert_int_equal(region_sz(&outer), VAL(4));
assert_int_equal(region_end(&outer), VAL(6));
struct region inner = { .offset = VAL(3), .size = VAL(2) };
struct region inner = {.offset = VAL(3), .size = VAL(2)};
assert_true(region_is_subregion(&outer, &inner));
struct region touching_bottom = { .offset = VAL(2), .size = VAL(1) };
struct region touching_bottom = {.offset = VAL(2), .size = VAL(1)};
assert_true(region_is_subregion(&outer, &touching_bottom));
struct region touching_top = { .offset = VAL(5), .size = VAL(1) };
struct region touching_top = {.offset = VAL(5), .size = VAL(1)};
assert_true(region_is_subregion(&outer, &touching_top));
struct region overlap_bottom = { .offset = VAL(1), .size = VAL(2) };
struct region overlap_bottom = {.offset = VAL(1), .size = VAL(2)};
assert_false(region_is_subregion(&outer, &overlap_bottom));
struct region overlap_top = { .offset = VAL(5), .size = VAL(2) };
struct region overlap_top = {.offset = VAL(5), .size = VAL(2)};
assert_false(region_is_subregion(&outer, &overlap_top));
struct region below = { .offset = 0, .size = VAL(1) };
struct region below = {.offset = 0, .size = VAL(1)};
assert_false(region_is_subregion(&outer, &below));
struct region above = { .offset = VAL(0xf), .size = VAL(1) };
struct region above = {.offset = VAL(0xf), .size = VAL(1)};
assert_false(region_is_subregion(&outer, &above));
}
@@ -58,8 +58,8 @@ static int mock_unmap(const struct region_device *rdev, void *mapping)
return mock();
}
static ssize_t mock_readat(const struct region_device *rdev, void *buffer,
size_t offset, size_t size)
static ssize_t mock_readat(const struct region_device *rdev, void *buffer, size_t offset,
size_t size)
{
check_expected_ptr(rdev);
check_expected_ptr(buffer);
@@ -73,8 +73,8 @@ static ssize_t mock_readat(const struct region_device *rdev, void *buffer,
return ret;
}
static ssize_t mock_writeat(const struct region_device *rdev, const void *buffer,
size_t offset, size_t size)
static ssize_t mock_writeat(const struct region_device *rdev, const void *buffer, size_t offset,
size_t size)
{
check_expected_ptr(rdev);
check_expected_ptr(buffer);
@@ -365,7 +365,7 @@ static void test_mem_rdev(void **state)
/* Test read/write/erase of larger chunk. */
size_t offs = 0x47;
size_t chunk = 0x72;
size_t chunk = 0x72;
memset(backing, 0, size);
memset(scratch, 0, size);
memset(scratch + offs, 0x39, chunk);