summaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorMete Durlu <meted@linux.ibm.com>2024-10-23 14:11:11 +0200
committerHeiko Carstens <hca@linux.ibm.com>2024-10-25 16:03:26 +0200
commit92a201b7648b7df9f2ada56a58c489811c51a6b2 (patch)
tree452fe10db492321a55ed585ce837db6d5976a04a /drivers/s390
parent182d54671c304d5f81eee6a29b5ef03023826989 (diff)
downloadlinux-92a201b7648b7df9f2ada56a58c489811c51a6b2.tar.gz
linux-92a201b7648b7df9f2ada56a58c489811c51a6b2.tar.bz2
linux-92a201b7648b7df9f2ada56a58c489811c51a6b2.zip
s390/sclp_ocf: Switch over to sysfs_emit()
Per Documentation/filesystems/sysfs.rst, sysfs_emit() is preferred for presenting attributes to user space in sysfs. Convert the left-over uses in the char/sclp_ocf code. Signed-off-by: Mete Durlu <meted@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/char/sclp_ocf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/s390/char/sclp_ocf.c b/drivers/s390/char/sclp_ocf.c
index d35f10ea5b52..ca6c5260dc53 100644
--- a/drivers/s390/char/sclp_ocf.c
+++ b/drivers/s390/char/sclp_ocf.c
@@ -101,7 +101,7 @@ static ssize_t cpc_name_show(struct kobject *kobj,
sclp_ocf_cpc_name_copy(name);
name[OCF_LENGTH_CPC_NAME] = 0;
EBCASC(name, OCF_LENGTH_CPC_NAME);
- return snprintf(page, PAGE_SIZE, "%s\n", name);
+ return sysfs_emit(page, "%s\n", name);
}
static struct kobj_attribute cpc_name_attr =
@@ -113,7 +113,7 @@ static ssize_t hmc_network_show(struct kobject *kobj,
int rc;
spin_lock_irq(&sclp_ocf_lock);
- rc = snprintf(page, PAGE_SIZE, "%s\n", hmc_network);
+ rc = sysfs_emit(page, "%s\n", hmc_network);
spin_unlock_irq(&sclp_ocf_lock);
return rc;
}