diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-10-16 18:05:08 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2014-10-17 11:55:16 +1100 |
commit | a8d479c63a4bbc99808a37f6958b3de517569918 (patch) | |
tree | 7729b87473edac0ec6a3576a1211a0b87c25446d /core/mem_region.c | |
parent | 78237cccad984a0d757e578ec2a9745de4fcfd87 (diff) | |
download | skiboot-a8d479c63a4bbc99808a37f6958b3de517569918.zip skiboot-a8d479c63a4bbc99808a37f6958b3de517569918.tar.gz skiboot-a8d479c63a4bbc99808a37f6958b3de517569918.tar.bz2 |
Rename mem_size() to mem_allocated_size()
This better states the intention of what it should return.
I was bit unsure when fixing mem_size(), so hopefully this
makes future me (or other people) less unsure as to the
intended return value of this function.
No functional changes, just rename.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Acked-by: Rusty Russell <rusty@au1.ibm.com>
Diffstat (limited to 'core/mem_region.c')
-rw-r--r-- | core/mem_region.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/mem_region.c b/core/mem_region.c index dd1f64f..10404f5 100644 --- a/core/mem_region.c +++ b/core/mem_region.c @@ -396,7 +396,7 @@ void mem_free(struct mem_region *region, void *mem, const char *location) make_free(region, (struct free_hdr *)hdr, location); } -size_t mem_size(const struct mem_region *region __unused, const void *ptr) +size_t mem_allocated_size(const void *ptr) { const struct alloc_hdr *hdr = ptr - sizeof(*hdr); return hdr->num_longs * sizeof(long) - sizeof(struct alloc_hdr); |