Commit 4d446656 authored by Baoyou Xie's avatar Baoyou Xie Committed by Alex Deucher

drm/amdgpu: mark symbols static where possible

We get 7 warnings when building kernel with W=1:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1990:5: warning: no previous prototype for 'amdgpu_pre_soft_reset' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c:1548:5: warning: no previous prototype for 'amdgpu_connector_virtual_dpms' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c:1560:5: warning: no previous prototype for 'amdgpu_connector_virtual_set_property' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c:330:5: warning: no previous prototype for 'amdgpu_cs_list_validate' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/dce_virtual.c:98:6: warning: no previous prototype for 'dce_virtual_stop_mc_access' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/dce_virtual.c:130:6: warning: no previous prototype for 'dce_virtual_resume_mc_access' [-Wmissing-prototypes]
drivers/gpu/drm/amd/amdgpu/dce_virtual.c:136:6: warning: no previous prototype for 'dce_virtual_set_vga_render_state' [-Wmissing-prototypes]

In fact, all of the 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 both functions with 'static'.
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarBaoyou Xie <baoyou.xie@linaro.org>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fa675329
...@@ -1545,7 +1545,8 @@ static int amdgpu_connector_virtual_mode_valid(struct drm_connector *connector, ...@@ -1545,7 +1545,8 @@ static int amdgpu_connector_virtual_mode_valid(struct drm_connector *connector,
return MODE_OK; return MODE_OK;
} }
int amdgpu_connector_virtual_dpms(struct drm_connector *connector, int mode) static int
amdgpu_connector_virtual_dpms(struct drm_connector *connector, int mode)
{ {
return 0; return 0;
} }
...@@ -1557,7 +1558,8 @@ amdgpu_connector_virtual_detect(struct drm_connector *connector, bool force) ...@@ -1557,7 +1558,8 @@ amdgpu_connector_virtual_detect(struct drm_connector *connector, bool force)
return connector_status_connected; return connector_status_connected;
} }
int amdgpu_connector_virtual_set_property(struct drm_connector *connector, static int
amdgpu_connector_virtual_set_property(struct drm_connector *connector,
struct drm_property *property, struct drm_property *property,
uint64_t val) uint64_t val)
{ {
......
...@@ -2078,7 +2078,7 @@ static bool amdgpu_check_soft_reset(struct amdgpu_device *adev) ...@@ -2078,7 +2078,7 @@ static bool amdgpu_check_soft_reset(struct amdgpu_device *adev)
return asic_hang; return asic_hang;
} }
int amdgpu_pre_soft_reset(struct amdgpu_device *adev) static int amdgpu_pre_soft_reset(struct amdgpu_device *adev)
{ {
int i, r = 0; int i, r = 0;
......
...@@ -95,7 +95,7 @@ static bool dce_virtual_is_display_hung(struct amdgpu_device *adev) ...@@ -95,7 +95,7 @@ static bool dce_virtual_is_display_hung(struct amdgpu_device *adev)
return false; return false;
} }
void dce_virtual_stop_mc_access(struct amdgpu_device *adev, static void dce_virtual_stop_mc_access(struct amdgpu_device *adev,
struct amdgpu_mode_mc_save *save) struct amdgpu_mode_mc_save *save)
{ {
switch (adev->asic_type) { switch (adev->asic_type) {
...@@ -127,13 +127,13 @@ void dce_virtual_stop_mc_access(struct amdgpu_device *adev, ...@@ -127,13 +127,13 @@ void dce_virtual_stop_mc_access(struct amdgpu_device *adev,
return; return;
} }
void dce_virtual_resume_mc_access(struct amdgpu_device *adev, static void dce_virtual_resume_mc_access(struct amdgpu_device *adev,
struct amdgpu_mode_mc_save *save) struct amdgpu_mode_mc_save *save)
{ {
return; return;
} }
void dce_virtual_set_vga_render_state(struct amdgpu_device *adev, static void dce_virtual_set_vga_render_state(struct amdgpu_device *adev,
bool render) bool render)
{ {
return; return;
......
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