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'.
Unified · Split
| @@ -906,7 +906,7 @@ static void si_pcie_wreg(struct amdgpu_device *adev, u32 reg, u32 v) · 905 unmodified lines | ||
| 906 | 906 | spin_unlock_irqrestore(&adev->pcie_idx_lock, flags); |
| 907 | 907 | } |
| 908 | 908 | |
| 909 | −u32 si_pciep_rreg(struct amdgpu_device *adev, u32 reg) | |
| 909 | +static u32 si_pciep_rreg(struct amdgpu_device *adev, u32 reg) | |
| 910 | 910 | { |
| 911 | 911 | unsigned long flags; |
| 912 | 912 | u32 r; |
| @@ -919,7 +919,7 @@ u32 si_pciep_rreg(struct amdgpu_device *adev, u32 reg) · 6 unmodified lines | ||
| 919 | 919 | return r; |
| 920 | 920 | } |
| 921 | 921 | |
| 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) | |
| 923 | 923 | { |
| 924 | 924 | unsigned long flags; |
| 925 | 925 | |