Skip to contentSkip to conversation

drm/amdkfd: mark som eclear_address_watch() callback static

PATCH In review Arnd Bergmann 2 participants 2 messages Jun 5, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdkfd: mark som eclear_address_watch() callback static

From: Arnd Bergmann <[email protected]>

Some of the newly introduced clear_address_watch callback handlers have no prototype because they are only used in one file, which causes a W=1 warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c:164:10: error: no previous prototype for 'kgd_gfx_aldebaran_clear_address_watch' [-Werror=missing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c:782:10: error: no previous prototype for 'kgd_gfx_v11_clear_address_watch' [-Werror=missing-prototypes]

Mark these ones static. If another user comes up in the future, that can be reverted along with adding the prototype.

Fixes cfd9715f741a1 ("drm/amdkfd: add debug set and clear address watch points operation")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c +1 -1
index efd6a72aab4eb..bdda8744398fe 100644
@@ -161,7 +161,7 @@ static uint32_t kgd_gfx_aldebaran_set_address_watch(
 	return watch_address_cntl;
 }
 
-uint32_t kgd_gfx_aldebaran_clear_address_watch(struct amdgpu_device *adev,
+static uint32_t kgd_gfx_aldebaran_clear_address_watch(struct amdgpu_device *adev,
 					uint32_t watch_id)
 {
 	return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c +1 -1
index 52efa690a3c21..131859ce3e7e9 100644
@@ -779,7 +779,7 @@ static uint32_t kgd_gfx_v11_set_address_watch(struct amdgpu_device *adev,
 	return watch_address_cntl;
 }
 
-uint32_t kgd_gfx_v11_clear_address_watch(struct amdgpu_device *adev,
+static uint32_t kgd_gfx_v11_clear_address_watch(struct amdgpu_device *adev,
 					uint32_t watch_id)
 {
 	return 0;
Signature · 1 line
2.39.2
#1 lore raw
Quoted 7 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Some of the newly introduced clear_address_watch callback handlers have no prototype because they are only used in one file, which causes a W=1 warning:

Quoted 8 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c:164:10: error: no previous prototype for 'kgd_gfx_aldebaran_clear_address_watch' [-Werror=missing-prototypes] drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c:782:10: error: no previous prototype for 'kgd_gfx_v11_clear_address_watch' [-Werror=missing-prototypes]

Mark these ones static. If another user comes up in the future, that can be reverted along with adding the prototype.

Fixes cfd9715f741a1 ("drm/amdkfd: add debug set and clear address watch points operation")

Thanks. Srinivasan already sent out a fix for this.

Alex

Quoted 34 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_aldebaran.c +1 -1
index efd6a72aab4eb..bdda8744398fe 100644
@@ -161,7 +161,7 @@ static uint32_t kgd_gfx_aldebaran_set_address_watch(
        return watch_address_cntl;
 }
 
-uint32_t kgd_gfx_aldebaran_clear_address_watch(struct amdgpu_device *adev,
+static uint32_t kgd_gfx_aldebaran_clear_address_watch(struct amdgpu_device *adev,
                                        uint32_t watch_id)
 {
        return 0;
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v11.c +1 -2
index 52efa690a3c21..131859ce3e7e9 100644
@@ -779,7 +779,7 @@ static uint32_t kgd_gfx_v11_set_address_watch(struct amdgpu_device *adev,
        return watch_address_cntl;
 }
 
-uint32_t kgd_gfx_v11_clear_address_watch(struct amdgpu_device *adev,
+static uint32_t kgd_gfx_v11_clear_address_watch(struct amdgpu_device *adev,
                                        uint32_t watch_id)
 {
        return 0;
--

2.39.2