drm/amdgpu: guard ras debugfs creation/removal based on CONFIG_DEBUG_FS
Subsystems (2)
PATCH 1/1 drm/amdgpu: guard ras debugfs creation/removal based on CONFIG_DEBUG_FS
It can avoid potential build warn/error whenCONFIG_DEBUG_FS is not set.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +4 -0
@@ -1244,6 +1244,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;
@@ -1266,6 +1267,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,
@@ -1282,6 +1284,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;
@@ -1290,6 +1293,7 @@ static void amdgpu_ras_debugfs_remove_all(struct amdgpu_device *adev) } con->dir =NULL ; +#endif }/* debugfs end */
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
-----Original Message-----
From: Chen, Guchun <[email protected]>
Sent: Thursday, August 13, 2020 3:04 PM
To: [email protected]; Zhang, Hawking <[email protected]>; Li, Dennis <[email protected]>; Zhou1, Tao <[email protected]>; Clements, John <[email protected]>; Deucher, Alexander <[email protected]>
Cc: Chen, Guchun <[email protected]>
Subject: [PATCH] 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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -0
@@ -1244,6 +1244,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;
@@ -1266,6 +1267,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, @@ -1282,6 +1284,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;
@@ -1290,6 +1293,7 @@ static void amdgpu_ras_debugfs_remove_all(struct amdgpu_device *adev)
}
con->dir = NULL;
+#endif
}
/* debugfs end */
--
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Public Use]
Quoted 57 lines
-----Original Message-----
From: Chen, Guchun <[email protected]>
Sent: Thursday, August 13, 2020 3:04 PM
To: [email protected]; Zhang, Hawking <[email protected]>; Li, Dennis <[email protected]>; Zhou1, Tao <[email protected]>; Clements, John <[email protected]>; Deucher, Alexander <[email protected]>
Cc: Chen, Guchun <[email protected]>
Subject: [PATCH] drm/amdgpu: guard ras debugfs creation/removal based onCONFIG_DEBUG_FSIt can avoid potential build warn/error when
CONFIG_DEBUG_FSis not set.Signed-off-by Guchun Chen <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-0@@ -1244,6 +1244,7 @@ void amdgpu_ras_debugfs_create(structamdgpu_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;@@ -1266,6 +1267,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, @@ -1282,6
+1284,7 @@ void amdgpu_ras_debugfs_remove(structamdgpu_device*adev,static void
amdgpu_ras_debugfs_remove_all(struct amdgpu_device *adev){drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-1+#if defined(CONFIG_DEBUG_FS )struct amdgpu_ras *con =amdgpu_ras_get_context (adev);struct ras_manager *obj, *tmp;@@ -1290,6 +1293,7 @@ static void amdgpu_ras_debugfs_remove_all(struct amdgpu_device *adev) } con->dir =NULL ; +#endif }/* debugfs end */ --
Quoted 1 line
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx