[PATCH] drm/amd/amdgpu: Fix error do not initialise globals to 0

SHANMUGAM, SRINIVASAN SRINIVASAN.SHANMUGAM at amd.com
Mon Mar 27 17:30:31 UTC 2023


[AMD Official Use Only - General]

Thanks a lot! Hamza Mahfooz for reviewing!

Best Wishes,
Srini

-----Original Message-----
From: Mahfooz, Hamza <Hamza.Mahfooz at amd.com> 
Sent: Monday, March 27, 2023 11:00 PM
To: SHANMUGAM, SRINIVASAN <SRINIVASAN.SHANMUGAM at amd.com>; Koenig, Christian <Christian.Koenig at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>; Limonciello, Mario <Mario.Limonciello at amd.com>
Cc: amd-gfx at lists.freedesktop.org
Subject: Re: [PATCH] drm/amd/amdgpu: Fix error do not initialise globals to 0

On 3/27/23 13:19, Srinivasan Shanmugam wrote:
> Global variables do not need to be initialized to 0 and checkpatch 
> flags this error in drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:
> 
> ERROR: do not initialise globals to 0
> +int amdgpu_no_queue_eviction_on_vm_fault = 0;
> 
> Fix this checkpatch error.
> 
> Cc: Christian König <christian.koenig at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: Mario Limonciello <mario.limonciello at amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>

Reviewed-by: Hamza Mahfooz <Hamza.Mahfooz at amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 917926c8dc5f5..67dbac87202e4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -823,7 +823,7 @@ MODULE_PARM_DESC(no_system_mem_limit, "disable system memory limit (false = defa
>    * DOC: no_queue_eviction_on_vm_fault (int)
>    * If set, process queues will not be evicted on gpuvm fault. This is to keep the wavefront context for debugging (0 = queue eviction, 1 = no queue eviction). The default is 0 (queue eviction).
>    */
> -int amdgpu_no_queue_eviction_on_vm_fault = 0;
> +int amdgpu_no_queue_eviction_on_vm_fault;
>   MODULE_PARM_DESC(no_queue_eviction_on_vm_fault, "No queue eviction on VM fault (0 = queue eviction, 1 = no queue eviction)");
>   module_param_named(no_queue_eviction_on_vm_fault, amdgpu_no_queue_eviction_on_vm_fault, int, 0444);
>   #endif

--
Hamza


More information about the amd-gfx mailing list