All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Fix style issues in amdgpu_debugfs.c
@ 2023-07-26 15:38 Praful Swarnakar
  2023-07-26 18:29 ` Alex Deucher
  0 siblings, 1 reply; 3+ messages in thread
From: Praful Swarnakar @ 2023-07-26 15:38 UTC (permalink / raw)
  To: Christian König, Alex Deucher, Guchun Chen; +Cc: Praful Swarnakar, amd-gfx

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@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Guchun Chen <guchun.chen@amd.com>
Signed-off-by: Praful Swarnakar <Praful.Swarnakar@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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu: Fix style issues in amdgpu_debugfs.c
  2023-07-26 15:38 [PATCH] drm/amdgpu: Fix style issues in amdgpu_debugfs.c Praful Swarnakar
@ 2023-07-26 18:29 ` Alex Deucher
  2023-07-27  0:51   ` SHANMUGAM, SRINIVASAN
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2023-07-26 18:29 UTC (permalink / raw)
  To: Praful Swarnakar; +Cc: Alex Deucher, amd-gfx, Christian König, Guchun Chen

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

On Wed, Jul 26, 2023 at 11:45 AM Praful Swarnakar
<Praful.Swarnakar@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@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Guchun Chen <guchun.chen@amd.com>
> Signed-off-by: Praful Swarnakar <Praful.Swarnakar@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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH] drm/amdgpu: Fix style issues in amdgpu_debugfs.c
  2023-07-26 18:29 ` Alex Deucher
@ 2023-07-27  0:51   ` SHANMUGAM, SRINIVASAN
  0 siblings, 0 replies; 3+ messages in thread
From: SHANMUGAM, SRINIVASAN @ 2023-07-27  0:51 UTC (permalink / raw)
  To: Alex Deucher, Swarnakar, Praful
  Cc: Deucher, Alexander, Koenig, Christian, amd-gfx, Chen, Guchun

[Public]

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

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

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

On Wed, Jul 26, 2023 at 11:45 AM Praful Swarnakar <Praful.Swarnakar@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@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Guchun Chen <guchun.chen@amd.com>
> Signed-off-by: Praful Swarnakar <Praful.Swarnakar@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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-27  0:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-26 15:38 [PATCH] drm/amdgpu: Fix style issues in amdgpu_debugfs.c Praful Swarnakar
2023-07-26 18:29 ` Alex Deucher
2023-07-27  0:51   ` SHANMUGAM, SRINIVASAN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.