diff options
author | ye xingchen <ye.xingchen@zte.com.cn> | 2022-12-01 10:24:21 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-12-01 15:21:34 -0500 |
commit | 2cffcb667921559042fe3025d6d40d2a54f78922 (patch) | |
tree | eedd07f53ef721545b7d363c42f80d81b341cfdf | |
parent | 949933b0f34f42af180a9ae59c263fcf4b76b710 (diff) | |
download | linux-2cffcb667921559042fe3025d6d40d2a54f78922.tar.gz linux-2cffcb667921559042fe3025d6d40d2a54f78922.tar.bz2 linux-2cffcb667921559042fe3025d6d40d2a54f78922.zip |
drm/amdgpu: use sysfs_emit() to instead of scnprintf()
Replace the open-code with sysfs_emit() to simplify the code.
Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 077404a9c935..ad490c1e2f57 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -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) |