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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)