Skip to contentSkip to conversation

drm: amdgpu: Move static inline keyword to the front of declarations

PATCH In review ChenTao 2 participants 2 messages Apr 24, 2020

Subsystems (2)
lore
Share & tools
lore

ChenTao

author
#0 lore raw

PATCH 1/1 drm: amdgpu: Move static inline keyword to the front of declarations

Fix the following warning:

Move the static inline keyword to the front of declarations amdgpu_device_wreg_no_kiq, and resolve the following compiler warnings that can be seen when building with warnings enabled (W=1):

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:344:1:warning:
‘static’ is not at beginning of declaration drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:344:1:warning:
‘inline’ is not at beginning of declaration

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index ad1c66763dc1..d53a5e3f464b 100644
@@ -341,7 +341,7 @@ void amdgpu_mm_wreg8(struct amdgpu_device *adev, uint32_t offset, uint8_t value)
 		BUG();
 }
 
-void static inline amdgpu_device_wreg_no_kiq(struct amdgpu_device *adev, uint32_t reg,
+static inline void amdgpu_device_wreg_no_kiq(struct amdgpu_device *adev, uint32_t reg,
 					     uint32_t v, uint32_t acc_flags)
 {
 	trace_amdgpu_device_wreg(adev->pdev->device, reg, v);
Signature · 1 line
2.17.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Am 24.04.20 um 05:13 schrieb ChenTao:

Quoted 7 lines

Fix the following warning:

Move the static inline keyword to the front of declarations amdgpu_device_wreg_no_kiq, and resolve the following compiler warnings that can be seen when building with warnings enabled (W=1):

Quoted 7 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:344:1:warning:
‘static’ is not at beginning of declaration drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:344:1:warning:
‘inline’ is not at beginning of declaration

Quoted 17 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index ad1c66763dc1..d53a5e3f464b 100644
@@ -341,7 +341,7 @@ void amdgpu_mm_wreg8(struct amdgpu_device *adev, uint32_t offset, uint8_t value)
  		BUG();
  }
 
-void static inline amdgpu_device_wreg_no_kiq(struct amdgpu_device *adev, uint32_t reg,
+static inline void amdgpu_device_wreg_no_kiq(struct amdgpu_device *adev, uint32_t reg,
  					     uint32_t v, uint32_t acc_flags)
  {
  	trace_amdgpu_device_wreg(adev->pdev->device, reg, v);