Commit 761c2e82 authored by Baoyou Xie's avatar Baoyou Xie Committed by Alex Deucher

drm/amdgpu: mark symbols static where possible

We get a few warnings when building kernel with W=1:
drivers/gpu/drm/amd/amdgpu/cz_smc.c:51:5: warning: no previous prototype for 'cz_send_msg_to_smc_async' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/cz_smc.c:143:5: warning: no previous prototype for 'cz_write_smc_sram_dword' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/iceland_smc.c:124:6: warning: no previous prototype for 'iceland_start_smc' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c:3926:6: warning: no previous prototype for 'gfx_v8_0_rlc_stop' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c:94:6: warning: no previous prototype for 'amdgpu_job_free_cb' [-Wmissing-prototypes]
....

In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks these functions with 'static'.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Acked-by: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarEdward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: default avatarBaoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 9ca91fdd
...@@ -616,7 +616,7 @@ static int amdgpu_cgs_irq_put(struct cgs_device *cgs_device, unsigned src_id, un ...@@ -616,7 +616,7 @@ static int amdgpu_cgs_irq_put(struct cgs_device *cgs_device, unsigned src_id, un
return amdgpu_irq_put(adev, adev->irq.sources[src_id], type); return amdgpu_irq_put(adev, adev->irq.sources[src_id], type);
} }
int amdgpu_cgs_set_clockgating_state(struct cgs_device *cgs_device, static int amdgpu_cgs_set_clockgating_state(struct cgs_device *cgs_device,
enum amd_ip_block_type block_type, enum amd_ip_block_type block_type,
enum amd_clockgating_state state) enum amd_clockgating_state state)
{ {
...@@ -637,7 +637,7 @@ int amdgpu_cgs_set_clockgating_state(struct cgs_device *cgs_device, ...@@ -637,7 +637,7 @@ int amdgpu_cgs_set_clockgating_state(struct cgs_device *cgs_device,
return r; return r;
} }
int amdgpu_cgs_set_powergating_state(struct cgs_device *cgs_device, static int amdgpu_cgs_set_powergating_state(struct cgs_device *cgs_device,
enum amd_ip_block_type block_type, enum amd_ip_block_type block_type,
enum amd_powergating_state state) enum amd_powergating_state state)
{ {
......
...@@ -431,7 +431,7 @@ static bool amdgpu_cs_try_evict(struct amdgpu_cs_parser *p, ...@@ -431,7 +431,7 @@ static bool amdgpu_cs_try_evict(struct amdgpu_cs_parser *p,
return false; return false;
} }
int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p, static int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p,
struct list_head *validated) struct list_head *validated)
{ {
struct amdgpu_bo_list_entry *lobj; struct amdgpu_bo_list_entry *lobj;
......
...@@ -91,7 +91,7 @@ void amdgpu_job_free_resources(struct amdgpu_job *job) ...@@ -91,7 +91,7 @@ void amdgpu_job_free_resources(struct amdgpu_job *job)
amdgpu_ib_free(job->adev, &job->ibs[i], f); amdgpu_ib_free(job->adev, &job->ibs[i], f);
} }
void amdgpu_job_free_cb(struct amd_sched_job *s_job) static void amdgpu_job_free_cb(struct amd_sched_job *s_job)
{ {
struct amdgpu_job *job = container_of(s_job, struct amdgpu_job, base); struct amdgpu_job *job = container_of(s_job, struct amdgpu_job, base);
......
...@@ -50,7 +50,7 @@ static struct cz_smu_private_data *cz_smu_get_priv(struct amdgpu_device *adev) ...@@ -50,7 +50,7 @@ static struct cz_smu_private_data *cz_smu_get_priv(struct amdgpu_device *adev)
return priv; return priv;
} }
int cz_send_msg_to_smc_async(struct amdgpu_device *adev, u16 msg) static int cz_send_msg_to_smc_async(struct amdgpu_device *adev, u16 msg)
{ {
int i; int i;
u32 content = 0, tmp; u32 content = 0, tmp;
...@@ -142,7 +142,7 @@ int cz_read_smc_sram_dword(struct amdgpu_device *adev, u32 smc_address, ...@@ -142,7 +142,7 @@ int cz_read_smc_sram_dword(struct amdgpu_device *adev, u32 smc_address,
return 0; return 0;
} }
int cz_write_smc_sram_dword(struct amdgpu_device *adev, u32 smc_address, static int cz_write_smc_sram_dword(struct amdgpu_device *adev, u32 smc_address,
u32 value, u32 limit) u32 value, u32 limit)
{ {
int ret; int ret;
......
...@@ -3862,7 +3862,7 @@ static void gfx_v8_0_init_pg(struct amdgpu_device *adev) ...@@ -3862,7 +3862,7 @@ static void gfx_v8_0_init_pg(struct amdgpu_device *adev)
} }
} }
void gfx_v8_0_rlc_stop(struct amdgpu_device *adev) static void gfx_v8_0_rlc_stop(struct amdgpu_device *adev)
{ {
WREG32_FIELD(RLC_CNTL, RLC_ENABLE_F32, 0); WREG32_FIELD(RLC_CNTL, RLC_ENABLE_F32, 0);
......
...@@ -121,7 +121,7 @@ static int iceland_copy_bytes_to_smc(struct amdgpu_device *adev, ...@@ -121,7 +121,7 @@ static int iceland_copy_bytes_to_smc(struct amdgpu_device *adev,
return result; return result;
} }
void iceland_start_smc(struct amdgpu_device *adev) static void iceland_start_smc(struct amdgpu_device *adev)
{ {
uint32_t val = RREG32_SMC(ixSMC_SYSCON_RESET_CNTL); uint32_t val = RREG32_SMC(ixSMC_SYSCON_RESET_CNTL);
...@@ -129,7 +129,7 @@ void iceland_start_smc(struct amdgpu_device *adev) ...@@ -129,7 +129,7 @@ void iceland_start_smc(struct amdgpu_device *adev)
WREG32_SMC(ixSMC_SYSCON_RESET_CNTL, val); WREG32_SMC(ixSMC_SYSCON_RESET_CNTL, val);
} }
void iceland_reset_smc(struct amdgpu_device *adev) static void iceland_reset_smc(struct amdgpu_device *adev)
{ {
uint32_t val = RREG32_SMC(ixSMC_SYSCON_RESET_CNTL); uint32_t val = RREG32_SMC(ixSMC_SYSCON_RESET_CNTL);
...@@ -145,7 +145,7 @@ static int iceland_program_jump_on_start(struct amdgpu_device *adev) ...@@ -145,7 +145,7 @@ static int iceland_program_jump_on_start(struct amdgpu_device *adev)
return 0; return 0;
} }
void iceland_stop_smc_clock(struct amdgpu_device *adev) static void iceland_stop_smc_clock(struct amdgpu_device *adev)
{ {
uint32_t val = RREG32_SMC(ixSMC_SYSCON_CLOCK_CNTL_0); uint32_t val = RREG32_SMC(ixSMC_SYSCON_CLOCK_CNTL_0);
...@@ -153,7 +153,7 @@ void iceland_stop_smc_clock(struct amdgpu_device *adev) ...@@ -153,7 +153,7 @@ void iceland_stop_smc_clock(struct amdgpu_device *adev)
WREG32_SMC(ixSMC_SYSCON_CLOCK_CNTL_0, val); WREG32_SMC(ixSMC_SYSCON_CLOCK_CNTL_0, val);
} }
void iceland_start_smc_clock(struct amdgpu_device *adev) static void iceland_start_smc_clock(struct amdgpu_device *adev)
{ {
uint32_t val = RREG32_SMC(ixSMC_SYSCON_CLOCK_CNTL_0); uint32_t val = RREG32_SMC(ixSMC_SYSCON_CLOCK_CNTL_0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment