mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
drm/amdgpu: guard ras debugfs creation/removal based on CONFIG_DEBUG_FS
It can avoid potential build warn/error when CONFIG_DEBUG_FS is not set. Signed-off-by: Guchun Chen <[email protected]> Reviewed-by: Tao Zhou <[email protected]> Reviewed-by: Dennis Li <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
This commit is contained in:
1 parent
2e2f5dd514
commit
ae2bf61ff3
1 file changed
+4
@@ -1246,6 +1246,7 @@ void amdgpu_ras_debugfs_create(struct amdgpu_device *adev,
|
||||
|
||||
void amdgpu_ras_debugfs_create_all(struct amdgpu_device *adev)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
|
||||
struct ras_manager *obj;
|
||||
struct ras_fs_if fs_info;
|
||||
@@ -1268,6 +1269,7 @@ void amdgpu_ras_debugfs_create_all(struct amdgpu_device *adev)
|
||||
amdgpu_ras_debugfs_create(adev, &fs_info);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void amdgpu_ras_debugfs_remove(struct amdgpu_device *adev,
|
||||
@@ -1284,6 +1286,7 @@ void amdgpu_ras_debugfs_remove(struct amdgpu_device *adev,
|
||||
|
||||
static void amdgpu_ras_debugfs_remove_all(struct amdgpu_device *adev)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
struct amdgpu_ras *con = amdgpu_ras_get_context(adev);
|
||||
struct ras_manager *obj, *tmp;
|
||||
|
||||
@@ -1292,6 +1295,7 @@ static void amdgpu_ras_debugfs_remove_all(struct amdgpu_device *adev)
|
||||
}
|
||||
|
||||
con->dir = NULL;
|
||||
#endif
|
||||
}
|
||||
/* debugfs end */
|
||||
|
||||
|
||||
Reference in new issue
Block a user