From 1e9ad3ca0d9bf3e917eb2beb460421155144760a Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sat, 15 Oct 2022 23:55:39 +0100 Subject: Remove buflib allocation names, part two Remove allocation names from the buflib API and fix up all callers. Change-Id: I3df922e258d5f0d711d70e72b56b4ed634fb0f5a --- firmware/buflib.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'firmware/buflib.c') diff --git a/firmware/buflib.c b/firmware/buflib.c index ea57dbb379..8fc32f7406 100644 --- a/firmware/buflib.c +++ b/firmware/buflib.c @@ -633,7 +633,7 @@ buflib_buffer_in(struct buflib_context *ctx, int size) int buflib_alloc(struct buflib_context *ctx, size_t size) { - return buflib_alloc_ex(ctx, size, NULL, NULL); + return buflib_alloc_ex(ctx, size, NULL); } /* Allocate a buffer of size bytes, returning a handle for it. @@ -647,11 +647,9 @@ buflib_alloc(struct buflib_context *ctx, size_t size) */ int -buflib_alloc_ex(struct buflib_context *ctx, size_t size, const char *name, +buflib_alloc_ex(struct buflib_context *ctx, size_t size, struct buflib_callbacks *ops) { - (void)name; - union buflib_data *handle, *block; bool last; /* This really is assigned a value before use */ @@ -943,7 +941,7 @@ buflib_available(struct buflib_context* ctx) * serviced anyway). */ int -buflib_alloc_maximum(struct buflib_context* ctx, const char* name, size_t *size, struct buflib_callbacks *ops) +buflib_alloc_maximum(struct buflib_context* ctx, size_t *size, struct buflib_callbacks *ops) { /* ignore ctx->compact because it's true if all movable blocks are contiguous * even if the buffer has holes due to unmovable allocations */ @@ -960,7 +958,7 @@ buflib_alloc_maximum(struct buflib_context* ctx, const char* name, size_t *size, if (*size <= 0) /* OOM */ return -1; - return buflib_alloc_ex(ctx, *size, name, ops); + return buflib_alloc_ex(ctx, *size, ops); } /* Shrink the allocation indicated by the handle according to new_start and @@ -1073,13 +1071,6 @@ unsigned buflib_pin_count(struct buflib_context *ctx, int handle) return data[-bidx_PIN].pincount; } -const char* buflib_get_name(struct buflib_context *ctx, int handle) -{ - (void)ctx; - (void)handle; - return ""; -} - #ifdef DEBUG void *buflib_get_data(struct buflib_context *ctx, int handle) -- cgit v1.2.3