[PATCH] drm/amd/amdgpu: Remove initialisation of globals to 0 or NULL
SHANMUGAM, SRINIVASAN
SRINIVASAN.SHANMUGAM at amd.com
Mon Mar 27 18:49:23 UTC 2023
[AMD Official Use Only - General]
Thanks a lot Alex for reviewing the patch.
Best Regards,
Srini
-----Original Message-----
From: Alex Deucher <alexdeucher at gmail.com>
Sent: Tuesday, March 28, 2023 12:12 AM
To: SHANMUGAM, SRINIVASAN <SRINIVASAN.SHANMUGAM at amd.com>
Cc: Koenig, Christian <Christian.Koenig at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>; Limonciello, Mario <Mario.Limonciello at amd.com>; Mahfooz, Hamza <Hamza.Mahfooz at amd.com>; amd-gfx at lists.freedesktop.org
Subject: Re: [PATCH] drm/amd/amdgpu: Remove initialisation of globals to 0 or NULL
On Mon, Mar 27, 2023 at 2:11 PM Srinivasan Shanmugam <srinivasan.shanmugam at amd.com> wrote:
>
> Global variables do not need to be initialized to 0 or NULL and
> checkpatch flags this error in drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:
>
> ERROR: do not initialise globals to NULL
> +char *amdgpu_disable_cu = NULL;
> +char *amdgpu_virtual_display = NULL;
>
> 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>
> Cc: Hamza Mahfooz <Hamza.Mahfooz at amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index 917926c8dc5f5..ece8033dbad29 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -149,8 +149,8 @@ uint amdgpu_pcie_lane_cap;
> u64 amdgpu_cg_mask = 0xffffffffffffffff; uint amdgpu_pg_mask =
> 0xffffffff; uint amdgpu_sdma_phase_quantum = 32; -char
> *amdgpu_disable_cu = NULL; -char *amdgpu_virtual_display = NULL;
> +char *amdgpu_disable_cu;
> +char *amdgpu_virtual_display;
>
> /*
> * OverDrive(bit 14) disabled by default
> --
> 2.25.1
>
More information about the amd-gfx
mailing list