From: Saurav Girepunje <saurav.girepunje@gmail.com>
To: alexander.deucher@amd.com, christian.koenig@amd.com,
David1.Zhou@amd.com, airlied@linux.ie, daniel@ffwll.ch,
tom.stdenis@amd.com, xywang.sjtu@sjtu.edu.cn, Jack.Xiao@amd.com,
sam@ravnborg.org, Kevin1.Wang@amd.com,
saurav.girepunje@gmail.com, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: saurav.girepunje@hotmail.com
Subject: [PATCH] drm: amd: amdgpu: Remove NULL check not needed before freeing functions
Date: Tue, 29 Oct 2019 14:49:43 +0530 [thread overview]
Message-ID: <20191029091943.GA10258@saurav> (raw)
Remove unneeded NULL check before freeing functions
kfree and debugfs_remove.
Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 5652cc72ed3a..cb94627fc0f4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -1077,8 +1077,7 @@ static int amdgpu_debugfs_ib_preempt(void *data, u64 val)
ttm_bo_unlock_delayed_workqueue(&adev->mman.bdev, resched);
- if (fences)
- kfree(fences);
+ kfree(fences);
return 0;
}
@@ -1103,8 +1102,7 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
void amdgpu_debugfs_preempt_cleanup(struct amdgpu_device *adev)
{
- if (adev->debugfs_preempt)
- debugfs_remove(adev->debugfs_preempt);
+ debugfs_remove(adev->debugfs_preempt);
}
#else
--
2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: Saurav Girepunje <saurav.girepunje@gmail.com>
To: alexander.deucher@amd.com, christian.koenig@amd.com,
David1.Zhou@amd.com, airlied@linux.ie, daniel@ffwll.ch,
tom.stdenis@amd.com, xywang.sjtu@sjtu.edu.cn, Jack.Xiao@amd.com,
sam@ravnborg.org, Kevin1.Wang@amd.com,
saurav.girepunje@gmail.com, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: saurav.girepunje@hotmail.com
Subject: [PATCH] drm: amd: amdgpu: Remove NULL check not needed before freeing functions
Date: Tue, 29 Oct 2019 14:49:43 +0530 [thread overview]
Message-ID: <20191029091943.GA10258@saurav> (raw)
Message-ID: <20191029091943.R93Nmr1sfdXoQbvh2xzyTuMGyO4OTd4Jt6rBfiPxORM@z> (raw)
Remove unneeded NULL check before freeing functions
kfree and debugfs_remove.
Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 5652cc72ed3a..cb94627fc0f4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -1077,8 +1077,7 @@ static int amdgpu_debugfs_ib_preempt(void *data, u64 val)
ttm_bo_unlock_delayed_workqueue(&adev->mman.bdev, resched);
- if (fences)
- kfree(fences);
+ kfree(fences);
return 0;
}
@@ -1103,8 +1102,7 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
void amdgpu_debugfs_preempt_cleanup(struct amdgpu_device *adev)
{
- if (adev->debugfs_preempt)
- debugfs_remove(adev->debugfs_preempt);
+ debugfs_remove(adev->debugfs_preempt);
}
#else
--
2.20.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Saurav Girepunje <saurav.girepunje@gmail.com>
To: alexander.deucher@amd.com, christian.koenig@amd.com,
David1.Zhou@amd.com, airlied@linux.ie, daniel@ffwll.ch,
tom.stdenis@amd.com, xywang.sjtu@sjtu.edu.cn, Jack.Xiao@amd.com,
sam@ravnborg.org, Kevin1.Wang@amd.com,
saurav.girepunje@gmail.com, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: saurav.girepunje@hotmail.com
Subject: [PATCH] drm: amd: amdgpu: Remove NULL check not needed before freeing functions
Date: Tue, 29 Oct 2019 14:49:43 +0530 [thread overview]
Message-ID: <20191029091943.GA10258@saurav> (raw)
Message-ID: <20191029091943.DQJSXIFRDrtpAIKzjPBBpqCcduGf-6qnELWDPrQf5PE@z> (raw)
Remove unneeded NULL check before freeing functions
kfree and debugfs_remove.
Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 5652cc72ed3a..cb94627fc0f4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -1077,8 +1077,7 @@ static int amdgpu_debugfs_ib_preempt(void *data, u64 val)
ttm_bo_unlock_delayed_workqueue(&adev->mman.bdev, resched);
- if (fences)
- kfree(fences);
+ kfree(fences);
return 0;
}
@@ -1103,8 +1102,7 @@ int amdgpu_debugfs_init(struct amdgpu_device *adev)
void amdgpu_debugfs_preempt_cleanup(struct amdgpu_device *adev)
{
- if (adev->debugfs_preempt)
- debugfs_remove(adev->debugfs_preempt);
+ debugfs_remove(adev->debugfs_preempt);
}
#else
--
2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2019-10-29 9:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-29 9:19 Saurav Girepunje [this message]
2019-10-29 9:19 ` [PATCH] drm: amd: amdgpu: Remove NULL check not needed before freeing functions Saurav Girepunje
2019-10-29 9:19 ` Saurav Girepunje
2019-10-29 9:33 ` Wang, Kevin(Yang)
2019-10-29 9:33 ` Wang, Kevin(Yang)
2019-10-29 9:33 ` Wang, Kevin(Yang)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191029091943.GA10258@saurav \
--to=saurav.girepunje@gmail.com \
--cc=David1.Zhou@amd.com \
--cc=Jack.Xiao@amd.com \
--cc=Kevin1.Wang@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=saurav.girepunje@hotmail.com \
--cc=tom.stdenis@amd.com \
--cc=xywang.sjtu@sjtu.edu.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.