Skip to content

Commit 2cffcb6

Browse files
ye xingchenalexdeucher
authored andcommitted
drm/amdgpu: use sysfs_emit() to instead of scnprintf()
Replace the open-code with sysfs_emit() to simplify the code. Reviewed-by: Luben Tuikov <[email protected]> Signed-off-by: ye xingchen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 949933b commit 2cffcb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1267,7 +1267,7 @@ static ssize_t amdgpu_ras_sysfs_features_read(struct device *dev,
12671267
struct amdgpu_ras *con =
12681268
container_of(attr, struct amdgpu_ras, features_attr);
12691269

1270-
return scnprintf(buf, PAGE_SIZE, "feature mask: 0x%x\n", con->features);
1270+
return sysfs_emit(buf, "feature mask: 0x%x\n", con->features);
12711271
}
12721272

12731273
static void amdgpu_ras_sysfs_remove_bad_page_node(struct amdgpu_device *adev)

0 commit comments

Comments
 (0)