History

drm/amdgpu: mark symbols static where possible

We get 2 warnings when building kernel with W=1: drivers/gpu/drm/amd/amdgpu/si.c:908:5: warning: no previous prototype for 'si_pciep_rreg' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/si.c:921:6: warning: no previous prototype for 'si_pciep_wreg' [-Wmissing-prototypes] In fact, both 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'.

Baoyou Xie committed 10 years ago

Commit d1936cc1 parent 356aee31 file · +2 −2Browse files

Unified · Split

drivers/gpu/drm/amd/amdgpu/si.c+2−2
@@ -906,7 +906,7 @@ static void si_pcie_wreg(struct amdgpu_device *adev, u32 reg, u32 v) · 905 unmodified lines
906906 spin_unlock_irqrestore(&adev->pcie_idx_lock, flags);
907907 }
908908
909−u32 si_pciep_rreg(struct amdgpu_device *adev, u32 reg)
909+static u32 si_pciep_rreg(struct amdgpu_device *adev, u32 reg)
910910 {
911911 unsigned long flags;
912912 u32 r;
@@ -919,7 +919,7 @@ u32 si_pciep_rreg(struct amdgpu_device *adev, u32 reg) · 6 unmodified lines
919919 return r;
920920 }
921921
922−void si_pciep_wreg(struct amdgpu_device *adev, u32 reg, u32 v)
922+static void si_pciep_wreg(struct amdgpu_device *adev, u32 reg, u32 v)
923923 {
924924 unsigned long flags;
925925

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t