drm/amdgpu: Fix style issues in amdgpu_debugfs.c
Subsystems (2)
PATCH 1/1 drm/amdgpu: Fix style issues in amdgpu_debugfs.c
Fixes the following to align to linux coding style:
WARNING: Missing a blank line after declarations
WARNING: sizeof *rd should be sizeof(*rd)
--- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +2 -1
@@ -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 ;
Signature · 1 line
2.25.1
Quoted 38 lines · Praful Swarnakar
Fixes the following to align to linux coding style:
WARNING: Missing a blank line after declarations
WARNING: sizeof *rd should besizeof(*rd)Cc Christian König <[email protected]>Cc Alex Deucher <[email protected]>Cc Guchun Chen <[email protected]>Signed-off-by Praful Swarnakar <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +2
-2@@ -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
[Public]
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Wednesday, July 26, 2023 11:59 PM
To: Swarnakar, Praful <[email protected]>
Cc: Deucher, Alexander <[email protected]>; [email protected]; Koenig, Christian <[email protected]>; Chen, Guchun <[email protected]>
Subject: Re: [PATCH] drm/amdgpu: Fix style issues in amdgpu_debugfs.c
Quoted 39 lines · Praful Swarnakar
Fixes the following to align to linux coding style:
WARNING: Missing a blank line after declarations
WARNING: sizeof *rd should besizeof(*rd)Cc Christian König <[email protected]>Cc Alex Deucher <[email protected]>Cc Guchun Chen <[email protected]>Signed-off-by Praful Swarnakar <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +1
-1@@ -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