From 258a3507de825129f5e2a0eb2a31ef3262b1758b Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 4 Aug 2016 14:33:58 -0500 Subject: commonlib/region: make buffer argument const for writeat The buffer for writeat() should be marked as const as the contents won't be manipulated within the call. BUG=chrome-os-partner:55932 Change-Id: I968570c1cf80f918a07b97af625a56f11b5889c1 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/16084 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie Reviewed-by: Furquan Shaikh --- src/commonlib/include/commonlib/region.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/commonlib/include') diff --git a/src/commonlib/include/commonlib/region.h b/src/commonlib/include/commonlib/region.h index ffc507beae..bc3ded1d0a 100644 --- a/src/commonlib/include/commonlib/region.h +++ b/src/commonlib/include/commonlib/region.h @@ -52,8 +52,8 @@ ssize_t rdev_readat(const struct region_device *rd, void *b, size_t offset, * Returns < 0 on error otherwise returns size of data wrote at provided * offset from the buffer passed. */ -ssize_t rdev_writeat(const struct region_device *rd, void *b, size_t offset, - size_t size); +ssize_t rdev_writeat(const struct region_device *rd, const void *b, + size_t offset, size_t size); /* * Returns < 0 on error otherwise returns size of data erased. @@ -81,7 +81,7 @@ struct region_device_ops { void *(*mmap)(const struct region_device *, size_t, size_t); int (*munmap)(const struct region_device *, void *); ssize_t (*readat)(const struct region_device *, void *, size_t, size_t); - ssize_t (*writeat)(const struct region_device *, void *, size_t, + ssize_t (*writeat)(const struct region_device *, const void *, size_t, size_t); ssize_t (*eraseat)(const struct region_device *, size_t, size_t); }; -- cgit v1.2.3