Skip to content

Commit 89f3f24

Browse files
jiadozhualexdeucher
authored andcommitted
drm/amdgpu: Make amdgpu_ring_mux functions as static
lkp robot reported missing-prototypes and unused-but-set-variable warnings on some functions of amdgpu_mcbp_mux.c. Make them static and remove the unused variable. Reported-by: kernel test robot <[email protected]> Signed-off-by: Jiadong Zhu <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent f9d00a4 commit 89f3f24

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ unsigned int amdgpu_sw_ring_priority(int idx)
350350
}
351351

352352
/*Scan on low prio rings to have unsignaled fence and high ring has no fence.*/
353-
int amdgpu_mcbp_scan(struct amdgpu_ring_mux *mux)
353+
static int amdgpu_mcbp_scan(struct amdgpu_ring_mux *mux)
354354
{
355355
struct amdgpu_ring *ring;
356356
int i, need_preempt;
@@ -370,7 +370,7 @@ int amdgpu_mcbp_scan(struct amdgpu_ring_mux *mux)
370370
}
371371

372372
/* Trigger Mid-Command Buffer Preemption (MCBP) and find if we need to resubmit. */
373-
int amdgpu_mcbp_trigger_preempt(struct amdgpu_ring_mux *mux)
373+
static int amdgpu_mcbp_trigger_preempt(struct amdgpu_ring_mux *mux)
374374
{
375375
int r;
376376

@@ -434,7 +434,7 @@ void amdgpu_ring_mux_start_ib(struct amdgpu_ring_mux *mux, struct amdgpu_ring *r
434434

435435
static void scan_and_remove_signaled_chunk(struct amdgpu_ring_mux *mux, struct amdgpu_ring *ring)
436436
{
437-
uint32_t last_seq, size = 0;
437+
uint32_t last_seq = 0;
438438
struct amdgpu_mux_entry *e;
439439
struct amdgpu_mux_chunk *chunk, *tmp;
440440

@@ -450,8 +450,6 @@ static void scan_and_remove_signaled_chunk(struct amdgpu_ring_mux *mux, struct a
450450
if (chunk->sync_seq <= last_seq) {
451451
list_del(&chunk->entry);
452452
kmem_cache_free(amdgpu_mux_chunk_slab, chunk);
453-
} else {
454-
size++;
455453
}
456454
}
457455
}

0 commit comments

Comments
 (0)