From bb06af3f9b1d73ba70787fcfd122d017737d7094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Pi=C3=B1eiro?= Date: Tue, 9 Dec 2025 18:10:20 +0100 Subject: [PATCH] panfrost/job: avoid shadowing variable name Without this commit, panfrost_batch_update_access receives a parameter called "batch", and then it uses the same name while iterating for all batches on the current context. This can be confusing and error-prone, so let's rename the latter. Reviewed-by: Iago Toral Quiroga Reviewed-by: Boris Brezillon Part-of: --- src/gallium/drivers/panfrost/pan_job.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index 487148c0a10..d56187d2d7c 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -281,15 +281,15 @@ panfrost_batch_update_access(struct panfrost_batch *batch, if (writes) { unsigned i; foreach_batch(ctx, i) { - struct panfrost_batch *batch = &ctx->batches.slots[i]; - /* Skip the entry if this our batch. */ if (i == batch_idx) continue; + struct panfrost_batch *other_batch = &ctx->batches.slots[i]; + /* Submit if it's a user */ - if (panfrost_batch_uses_resource(batch, rsrc)) - panfrost_batch_submit(ctx, batch); + if (panfrost_batch_uses_resource(other_batch, rsrc)) + panfrost_batch_submit(ctx, other_batch); } } }