[PATCH] drm/amdgpu: Fix style issues in amdgpu_debugfs.c

SHANMUGAM, SRINIVASAN SRINIVASAN.SHANMUGAM at amd.com
Thu Jul 27 00:51:14 UTC 2023


[Public]

Reviewed-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Wednesday, July 26, 2023 11:59 PM
To: Swarnakar, Praful <Praful.Swarnakar at amd.com>
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; amd-gfx at lists.freedesktop.org; Koenig, Christian <Christian.Koenig at amd.com>; Chen, Guchun <Guchun.Chen at amd.com>
Subject: Re: [PATCH] drm/amdgpu: Fix style issues in amdgpu_debugfs.c

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

On Wed, Jul 26, 2023 at 11:45 AM Praful Swarnakar <Praful.Swarnakar at amd.com> wrote:
>
> Fixes the following to align to linux coding style:
>
> WARNING: Missing a blank line after declarations
> WARNING: sizeof *rd should be sizeof(*rd)
>
> Cc: Christian König <christian.koenig at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: Guchun Chen <guchun.chen at amd.com>
> Signed-off-by: Praful Swarnakar <Praful.Swarnakar at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> index 00ab0b3c8277..a4faea4fa0b5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
> @@ -375,7 +375,7 @@ static int amdgpu_debugfs_gprwave_open(struct
> inode *inode, struct file *file)  {
>         struct amdgpu_debugfs_gprwave_data *rd;
>
> -       rd = kzalloc(sizeof *rd, GFP_KERNEL);
> +       rd = kzalloc(sizeof(*rd), GFP_KERNEL);
>         if (!rd)
>                 return -ENOMEM;
>         rd->adev = file_inode(file)->i_private; @@ -388,6 +388,7 @@
> static int amdgpu_debugfs_gprwave_open(struct inode *inode, struct
> file *file)  static int amdgpu_debugfs_gprwave_release(struct inode
> *inode, struct file *file)  {
>         struct amdgpu_debugfs_gprwave_data *rd = file->private_data;
> +
>         mutex_destroy(&rd->lock);
>         kfree(file->private_data);
>         return 0;
> --
> 2.25.1
>


More information about the amd-gfx mailing list