X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fr600%2Fcompute_memory_pool.c;h=bcda155c71aa5c227ffd70051c0a98a0a284bdb2;hb=cbb0d4ad75e6309932af7995ca80fa5ff5db7c70;hp=d014b952a3f46236aa58543ee0c93047593b836d;hpb=7e43a280793af50e826fb6183670de8e3d427d74;p=mesa.git diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_pool.c index d014b952a3f..bcda155c71a 100644 --- a/src/gallium/drivers/r600/compute_memory_pool.c +++ b/src/gallium/drivers/r600/compute_memory_pool.c @@ -51,7 +51,7 @@ struct compute_memory_pool* compute_memory_pool_new( { struct compute_memory_pool* pool = (struct compute_memory_pool*) CALLOC(sizeof(struct compute_memory_pool), 1); - if (pool == NULL) + if (!pool) return NULL; COMPUTE_DBG(rscreen, "* compute_memory_pool_new()\n"); @@ -399,7 +399,7 @@ int compute_memory_promote_item(struct compute_memory_pool *pool, list_addtail(&item->link, pool->item_list); item->start_in_dw = start_in_dw; - if (src != NULL) { + if (src) { u_box_1d(0, item->size_in_dw * 4, &box); rctx->b.b.resource_copy_region(pipe, @@ -489,7 +489,7 @@ void compute_memory_move_item(struct compute_memory_pool *pool, struct r600_context *rctx = (struct r600_context *)pipe; struct pipe_box box; - struct compute_memory_item *prev; + MAYBE_UNUSED struct compute_memory_item *prev; COMPUTE_DBG(pool->screen, "* compute_memory_move_item()\n" " + Moving item %"PRIi64" from %"PRIi64" (%"PRIi64" bytes) to %"PRIu64" (%"PRIu64" bytes)\n", @@ -630,7 +630,7 @@ struct compute_memory_item* compute_memory_alloc( new_item = (struct compute_memory_item *) CALLOC(sizeof(struct compute_memory_item), 1); - if (new_item == NULL) + if (!new_item) return NULL; new_item->size_in_dw = size_in_dw;