drm/amdgpu: Fix warning when lockdep is enabled
authorxinhui pan <xinhui.pan@amd.com>
Mon, 11 Mar 2019 06:28:06 +0000 (14:28 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Mar 2019 20:36:51 +0000 (15:36 -0500)
Set ignore bit to satisfy locpdep.

Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

index bf462c59cb76f79f12aeeb791a3f7e3c7ebdc4e6..750087535f0039a5bedac31a1a32efc8b2a734fe 100644 (file)
@@ -740,6 +740,9 @@ static int amdgpu_ras_sysfs_create_feature_node(struct amdgpu_device *adev)
                .attr = {
                        .name = "features",
                        .mode = S_IRUGO,
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+                       .ignore_lockdep = 1,
+#endif
                },
                        .show = amdgpu_ras_sysfs_features_read,
        };
@@ -782,6 +785,9 @@ int amdgpu_ras_sysfs_create(struct amdgpu_device *adev,
                .attr = {
                        .name = obj->fs_data.sysfs_name,
                        .mode = S_IRUGO,
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+                       .ignore_lockdep = 1,
+#endif
                },
                        .show = amdgpu_ras_sysfs_read,
        };