Skip to content

Commit 0c1759e

Browse files
committed
fast-get: (cosmetic) use a local variable
In fast_put() sram_ptr == entry->sram_ptr, use the former since it's shorter. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent d29ddfa commit 0c1759e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

zephyr/lib/fast-get.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ void fast_put(struct k_heap *heap, struct k_mem_domain *mdom, const void *sram_p
284284
entry->refcount--;
285285

286286
if (!entry->refcount) {
287-
LOG_DBG("freeing buffer %p", entry->sram_ptr);
287+
LOG_DBG("freeing buffer %p", sram_ptr);
288288
sof_heap_free(heap, entry->sram_ptr);
289289
}
290290

@@ -299,7 +299,7 @@ void fast_put(struct k_heap *heap, struct k_mem_domain *mdom, const void *sram_p
299299
*/
300300
if (entry->size > FAST_GET_MAX_COPY_SIZE && entry->mdom && mdom) {
301301
struct k_mem_partition part = {
302-
.start = (uintptr_t)entry->sram_ptr,
302+
.start = (uintptr_t)sram_ptr,
303303
.size = ALIGN_UP(entry->size, CONFIG_MM_DRV_PAGE_SIZE),
304304
.attr = K_MEM_PARTITION_P_RO_U_RO | XTENSA_MMU_CACHED_WB,
305305
};

0 commit comments

Comments
 (0)