提交 2cffcb66 编写于 作者: Y ye xingchen 提交者: Alex Deucher

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

Replace the open-code with sysfs_emit() to simplify the code.
Reviewed-by: NLuben Tuikov <luben.tuikov@amd.com>
Signed-off-by: Nye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 949933b0
......@@ -1267,7 +1267,7 @@ static ssize_t amdgpu_ras_sysfs_features_read(struct device *dev,
struct amdgpu_ras *con =
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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册