Skip to content

Commit fc8e55f

Browse files
srishanmalexdeucher
authored andcommitted
drm/amdgpu: Use seq_puts() instead of seq_printf()
For a constant format without additional arguments, use seq_puts() instead of seq_printf(). Also, it fixes the following warning. WARNING: Prefer seq_puts to seq_printf And other style fixes: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' WARNING: Block comments should align the * on each line Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent a0cc8e1 commit fc8e55f

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
* Returns 0 on success, error on failure.
6363
*/
6464
int amdgpu_ib_get(struct amdgpu_device *adev, struct amdgpu_vm *vm,
65-
unsigned size, enum amdgpu_ib_pool_type pool_type,
65+
unsigned int size, enum amdgpu_ib_pool_type pool_type,
6666
struct amdgpu_ib *ib)
6767
{
6868
int r;
@@ -123,24 +123,24 @@ void amdgpu_ib_free(struct amdgpu_device *adev, struct amdgpu_ib *ib,
123123
* a CONST_IB), it will be put on the ring prior to the DE IB. Prior
124124
* to SI there was just a DE IB.
125125
*/
126-
int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
126+
int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned int num_ibs,
127127
struct amdgpu_ib *ibs, struct amdgpu_job *job,
128128
struct dma_fence **f)
129129
{
130130
struct amdgpu_device *adev = ring->adev;
131131
struct amdgpu_ib *ib = &ibs[0];
132132
struct dma_fence *tmp = NULL;
133133
bool need_ctx_switch;
134-
unsigned patch_offset = ~0;
134+
unsigned int patch_offset = ~0;
135135
struct amdgpu_vm *vm;
136136
uint64_t fence_ctx;
137137
uint32_t status = 0, alloc_size;
138-
unsigned fence_flags = 0;
138+
unsigned int fence_flags = 0;
139139
bool secure, init_shadow;
140140
u64 shadow_va, csa_va, gds_va;
141141
int vmid = AMDGPU_JOB_GET_VMID(job);
142142

143-
unsigned i;
143+
unsigned int i;
144144
int r = 0;
145145
bool need_pipe_sync = false;
146146

@@ -282,7 +282,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
282282
amdgpu_ring_emit_gfx_shadow(ring, 0, 0, 0, false, 0);
283283

284284
if (ring->funcs->init_cond_exec) {
285-
unsigned ce_offset = ~0;
285+
unsigned int ce_offset = ~0;
286286

287287
ce_offset = amdgpu_ring_init_cond_exec(ring);
288288
if (ce_offset != ~0 && ring->funcs->patch_cond_exec)
@@ -385,7 +385,7 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
385385
{
386386
long tmo_gfx, tmo_mm;
387387
int r, ret = 0;
388-
unsigned i;
388+
unsigned int i;
389389

390390
tmo_mm = tmo_gfx = AMDGPU_IB_TEST_TIMEOUT;
391391
if (amdgpu_sriov_vf(adev)) {
@@ -402,7 +402,7 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev)
402402
/* for CP & SDMA engines since they are scheduled together so
403403
* need to make the timeout width enough to cover the time
404404
* cost waiting for it coming back under RUNTIME only
405-
*/
405+
*/
406406
tmo_gfx = 8 * AMDGPU_IB_TEST_TIMEOUT;
407407
} else if (adev->gmc.xgmi.hive_id) {
408408
tmo_gfx = AMDGPU_IB_TEST_GFX_XGMI_TIMEOUT;
@@ -465,13 +465,13 @@ static int amdgpu_debugfs_sa_info_show(struct seq_file *m, void *unused)
465465
{
466466
struct amdgpu_device *adev = m->private;
467467

468-
seq_printf(m, "--------------------- DELAYED --------------------- \n");
468+
seq_puts(m, "--------------------- DELAYED ---------------------\n");
469469
amdgpu_sa_bo_dump_debug_info(&adev->ib_pools[AMDGPU_IB_POOL_DELAYED],
470470
m);
471-
seq_printf(m, "-------------------- IMMEDIATE -------------------- \n");
471+
seq_puts(m, "-------------------- IMMEDIATE --------------------\n");
472472
amdgpu_sa_bo_dump_debug_info(&adev->ib_pools[AMDGPU_IB_POOL_IMMEDIATE],
473473
m);
474-
seq_printf(m, "--------------------- DIRECT ---------------------- \n");
474+
seq_puts(m, "--------------------- DIRECT ----------------------\n");
475475
amdgpu_sa_bo_dump_debug_info(&adev->ib_pools[AMDGPU_IB_POOL_DIRECT], m);
476476

477477
return 0;

0 commit comments

Comments
 (0)