diff options
Diffstat (limited to 'firmware/buflib.c')
-rw-r--r-- | firmware/buflib.c | 17 |
1 files changed, 4 insertions, 13 deletions
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) | |||
633 | int | 633 | int |
634 | buflib_alloc(struct buflib_context *ctx, size_t size) | 634 | buflib_alloc(struct buflib_context *ctx, size_t size) |
635 | { | 635 | { |
636 | return buflib_alloc_ex(ctx, size, NULL, NULL); | 636 | return buflib_alloc_ex(ctx, size, NULL); |
637 | } | 637 | } |
638 | 638 | ||
639 | /* Allocate a buffer of size bytes, returning a handle for it. | 639 | /* Allocate a buffer of size bytes, returning a handle for it. |
@@ -647,11 +647,9 @@ buflib_alloc(struct buflib_context *ctx, size_t size) | |||
647 | */ | 647 | */ |
648 | 648 | ||
649 | int | 649 | int |
650 | buflib_alloc_ex(struct buflib_context *ctx, size_t size, const char *name, | 650 | buflib_alloc_ex(struct buflib_context *ctx, size_t size, |
651 | struct buflib_callbacks *ops) | 651 | struct buflib_callbacks *ops) |
652 | { | 652 | { |
653 | (void)name; | ||
654 | |||
655 | union buflib_data *handle, *block; | 653 | union buflib_data *handle, *block; |
656 | bool last; | 654 | bool last; |
657 | /* This really is assigned a value before use */ | 655 | /* This really is assigned a value before use */ |
@@ -943,7 +941,7 @@ buflib_available(struct buflib_context* ctx) | |||
943 | * serviced anyway). | 941 | * serviced anyway). |
944 | */ | 942 | */ |
945 | int | 943 | int |
946 | buflib_alloc_maximum(struct buflib_context* ctx, const char* name, size_t *size, struct buflib_callbacks *ops) | 944 | buflib_alloc_maximum(struct buflib_context* ctx, size_t *size, struct buflib_callbacks *ops) |
947 | { | 945 | { |
948 | /* ignore ctx->compact because it's true if all movable blocks are contiguous | 946 | /* ignore ctx->compact because it's true if all movable blocks are contiguous |
949 | * even if the buffer has holes due to unmovable allocations */ | 947 | * 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, | |||
960 | if (*size <= 0) /* OOM */ | 958 | if (*size <= 0) /* OOM */ |
961 | return -1; | 959 | return -1; |
962 | 960 | ||
963 | return buflib_alloc_ex(ctx, *size, name, ops); | 961 | return buflib_alloc_ex(ctx, *size, ops); |
964 | } | 962 | } |
965 | 963 | ||
966 | /* Shrink the allocation indicated by the handle according to new_start and | 964 | /* 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) | |||
1073 | return data[-bidx_PIN].pincount; | 1071 | return data[-bidx_PIN].pincount; |
1074 | } | 1072 | } |
1075 | 1073 | ||
1076 | const char* buflib_get_name(struct buflib_context *ctx, int handle) | ||
1077 | { | ||
1078 | (void)ctx; | ||
1079 | (void)handle; | ||
1080 | return ""; | ||
1081 | } | ||
1082 | |||
1083 | #ifdef DEBUG | 1074 | #ifdef DEBUG |
1084 | 1075 | ||
1085 | void *buflib_get_data(struct buflib_context *ctx, int handle) | 1076 | void *buflib_get_data(struct buflib_context *ctx, int handle) |