Commit 2cffcb66 authored by ye xingchen's avatar ye xingchen Committed by Alex Deucher

drm/amdgpu: use sysfs_emit() to instead of scnprintf()

Replace the open-code with sysfs_emit() to simplify the code.
Reviewed-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
Signed-off-by: default avatarye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 949933b0
...@@ -1267,7 +1267,7 @@ static ssize_t amdgpu_ras_sysfs_features_read(struct device *dev, ...@@ -1267,7 +1267,7 @@ static ssize_t amdgpu_ras_sysfs_features_read(struct device *dev,
struct amdgpu_ras *con = struct amdgpu_ras *con =
container_of(attr, struct amdgpu_ras, features_attr); container_of(attr, struct amdgpu_ras, features_attr);
return scnprintf(buf, PAGE_SIZE, "feature mask: 0x%x\n", con->features); return sysfs_emit(buf, "feature mask: 0x%x\n", con->features);
} }
static void amdgpu_ras_sysfs_remove_bad_page_node(struct amdgpu_device *adev) static void amdgpu_ras_sysfs_remove_bad_page_node(struct amdgpu_device *adev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment