amdkfd: no need to check return value of debugfs_create functions
When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Oded Gabbay <oded.gabbay@gmail.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: "Christian König" <christian.koenig@amd.com> Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: dri-devel@lists.freedesktop.org Cc: amd-gfx@lists.freedesktop.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
450f30ea9c
commit
641d30035c
|
@ -85,36 +85,16 @@ static const struct file_operations kfd_debugfs_hang_hws_fops = {
|
||||||
|
|
||||||
void kfd_debugfs_init(void)
|
void kfd_debugfs_init(void)
|
||||||
{
|
{
|
||||||
struct dentry *ent;
|
|
||||||
|
|
||||||
debugfs_root = debugfs_create_dir("kfd", NULL);
|
debugfs_root = debugfs_create_dir("kfd", NULL);
|
||||||
if (!debugfs_root || debugfs_root == ERR_PTR(-ENODEV)) {
|
|
||||||
pr_warn("Failed to create kfd debugfs dir\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ent = debugfs_create_file("mqds", S_IFREG | 0444, debugfs_root,
|
debugfs_create_file("mqds", S_IFREG | 0444, debugfs_root,
|
||||||
kfd_debugfs_mqds_by_process,
|
kfd_debugfs_mqds_by_process, &kfd_debugfs_fops);
|
||||||
&kfd_debugfs_fops);
|
debugfs_create_file("hqds", S_IFREG | 0444, debugfs_root,
|
||||||
if (!ent)
|
kfd_debugfs_hqds_by_device, &kfd_debugfs_fops);
|
||||||
pr_warn("Failed to create mqds in kfd debugfs\n");
|
debugfs_create_file("rls", S_IFREG | 0444, debugfs_root,
|
||||||
|
kfd_debugfs_rls_by_device, &kfd_debugfs_fops);
|
||||||
ent = debugfs_create_file("hqds", S_IFREG | 0444, debugfs_root,
|
debugfs_create_file("hang_hws", S_IFREG | 0644, debugfs_root,
|
||||||
kfd_debugfs_hqds_by_device,
|
NULL, &kfd_debugfs_hang_hws_fops);
|
||||||
&kfd_debugfs_fops);
|
|
||||||
if (!ent)
|
|
||||||
pr_warn("Failed to create hqds in kfd debugfs\n");
|
|
||||||
|
|
||||||
ent = debugfs_create_file("rls", S_IFREG | 0444, debugfs_root,
|
|
||||||
kfd_debugfs_rls_by_device,
|
|
||||||
&kfd_debugfs_fops);
|
|
||||||
|
|
||||||
ent = debugfs_create_file("hang_hws", S_IFREG | 0644, debugfs_root,
|
|
||||||
NULL,
|
|
||||||
&kfd_debugfs_hang_hws_fops);
|
|
||||||
|
|
||||||
if (!ent)
|
|
||||||
pr_warn("Failed to create rls in kfd debugfs\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void kfd_debugfs_fini(void)
|
void kfd_debugfs_fini(void)
|
||||||
|
|
Loading…
Reference in New Issue