]> git.itanic.dy.fi Git - linux-stable/commitdiff
drm/amdgpu: declare static function to fix compiler warning
authorGuchun Chen <guchun.chen@amd.com>
Fri, 26 Nov 2021 05:14:41 +0000 (13:14 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Dec 2021 21:03:56 +0000 (16:03 -0500)
>> drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:503:6: warning: no previous prototype for function 'release_psp_cmd_buf' [-Wmissing-prototypes]
   void release_psp_cmd_buf(struct psp_context *psp)
        ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:503:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   void release_psp_cmd_buf(struct psp_context *psp)
   ^
   static
   1 warning generated.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Kevin Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

index c641f84649d6bd3da8eaf6eaece54c1e22cbb810..b48d68d30d801cfb275e4e7b5ffd30280fa485ae 100644 (file)
@@ -518,7 +518,7 @@ static struct psp_gfx_cmd_resp *acquire_psp_cmd_buf(struct psp_context *psp)
        return cmd;
 }
 
-void release_psp_cmd_buf(struct psp_context *psp)
+static void release_psp_cmd_buf(struct psp_context *psp)
 {
        mutex_unlock(&psp->mutex);
 }