mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 03:23:53 -04:00
drm/amd/amdgpu: Fix errors & warnings in amdgpu _bios, _cs, _dma_buf, _fence.c
The following checkpatch errors & warning is removed.
ERROR: else should follow close brace '}'
ERROR: trailing statements should be on next line
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
WARNING: Possible repeated word: 'Fences'
WARNING: Missing a blank line after declarations
WARNING: braces {} are not necessary for single statement blocks
WARNING: Comparisons should place the constant on the right side of the test
WARNING: printk() should include KERN_<LEVEL> facility level
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: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
0e768043bf
commit
9e69018458
@@ -397,7 +397,7 @@ static int amdgpu_cs_p2_dependencies(struct amdgpu_cs_parser *p,
|
||||
{
|
||||
struct drm_amdgpu_cs_chunk_dep *deps = chunk->kdata;
|
||||
struct amdgpu_fpriv *fpriv = p->filp->driver_priv;
|
||||
unsigned num_deps;
|
||||
unsigned int num_deps;
|
||||
int i, r;
|
||||
|
||||
num_deps = chunk->length_dw * 4 /
|
||||
@@ -468,7 +468,7 @@ static int amdgpu_cs_p2_syncobj_in(struct amdgpu_cs_parser *p,
|
||||
struct amdgpu_cs_chunk *chunk)
|
||||
{
|
||||
struct drm_amdgpu_cs_chunk_sem *deps = chunk->kdata;
|
||||
unsigned num_deps;
|
||||
unsigned int num_deps;
|
||||
int i, r;
|
||||
|
||||
num_deps = chunk->length_dw * 4 /
|
||||
@@ -486,7 +486,7 @@ static int amdgpu_cs_p2_syncobj_timeline_wait(struct amdgpu_cs_parser *p,
|
||||
struct amdgpu_cs_chunk *chunk)
|
||||
{
|
||||
struct drm_amdgpu_cs_chunk_syncobj *syncobj_deps = chunk->kdata;
|
||||
unsigned num_deps;
|
||||
unsigned int num_deps;
|
||||
int i, r;
|
||||
|
||||
num_deps = chunk->length_dw * 4 /
|
||||
@@ -506,7 +506,7 @@ static int amdgpu_cs_p2_syncobj_out(struct amdgpu_cs_parser *p,
|
||||
struct amdgpu_cs_chunk *chunk)
|
||||
{
|
||||
struct drm_amdgpu_cs_chunk_sem *deps = chunk->kdata;
|
||||
unsigned num_deps;
|
||||
unsigned int num_deps;
|
||||
int i;
|
||||
|
||||
num_deps = chunk->length_dw * 4 /
|
||||
@@ -540,7 +540,7 @@ static int amdgpu_cs_p2_syncobj_timeline_signal(struct amdgpu_cs_parser *p,
|
||||
struct amdgpu_cs_chunk *chunk)
|
||||
{
|
||||
struct drm_amdgpu_cs_chunk_syncobj *syncobj_deps = chunk->kdata;
|
||||
unsigned num_deps;
|
||||
unsigned int num_deps;
|
||||
int i;
|
||||
|
||||
num_deps = chunk->length_dw * 4 /
|
||||
@@ -758,6 +758,7 @@ static void amdgpu_cs_get_threshold_for_moves(struct amdgpu_device *adev,
|
||||
|
||||
if (used_vis_vram < total_vis_vram) {
|
||||
u64 free_vis_vram = total_vis_vram - used_vis_vram;
|
||||
|
||||
adev->mm_stats.accum_us_vis = min(adev->mm_stats.accum_us_vis +
|
||||
increment_us, us_upper_bound);
|
||||
|
||||
@@ -1076,9 +1077,8 @@ static int amdgpu_cs_patch_ibs(struct amdgpu_cs_parser *p,
|
||||
|
||||
/* the IB should be reserved at this point */
|
||||
r = amdgpu_bo_kmap(aobj, (void **)&kptr);
|
||||
if (r) {
|
||||
if (r)
|
||||
return r;
|
||||
}
|
||||
|
||||
kptr += va_start - (m->start * AMDGPU_GPU_PAGE_SIZE);
|
||||
|
||||
@@ -1392,7 +1392,7 @@ error_cleanup:
|
||||
/* Cleanup the parser structure */
|
||||
static void amdgpu_cs_parser_fini(struct amdgpu_cs_parser *parser)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned int i;
|
||||
|
||||
amdgpu_sync_free(&parser->sync);
|
||||
for (i = 0; i < parser->num_post_deps; i++) {
|
||||
|
||||
Reference in New Issue
Block a user