| 383 | } |
| 384 | |
| 385 | static ssize_t xlate_readat(const struct region_device *rd, void *b, |
| 386 | size_t offset, size_t size) |
| 387 | { |
| 388 | struct region req = { |
| 389 | .offset = offset, |
| 390 | .size = size, |
| 391 | }; |
| 392 | const struct xlate_window *xlwindow; |
| 393 | const struct xlate_region_device *xldev; |
| 394 | |
| 395 | xldev = container_of(rd, typeof(*xldev), rdev); |
| 396 | |
| 397 | xlwindow = xlate_find_window(xldev, &req); |
| 398 | if (!xlwindow) |
| 399 | return -1; |
| 400 | |
| 401 | offset -= region_offset(&xlwindow->sub_region); |
| 402 | |
| 403 | return rdev_readat(xlwindow->access_dev, b, offset, size); |
| 404 | } |
| 405 | |
| 406 | static ssize_t xlate_writeat(const struct region_device *rd, const void *b, |
| 407 | size_t offset, size_t size) |
nothing calls this directly
no test coverage detected