From: Mete Durlu Date: Wed, 23 Oct 2024 12:11:10 +0000 (+0200) Subject: s390/vmlogrdr: Switch over to sysfs_emit() X-Git-Tag: v6.13-rc1~206^2~94 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=182d54671c304d5f81eee6a29b5ef03023826989;p=thirdparty%2Fkernel%2Flinux.git s390/vmlogrdr: 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/vmlogrdr code. Signed-off-by: Mete Durlu Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens --- diff --git a/drivers/s390/char/vmlogrdr.c b/drivers/s390/char/vmlogrdr.c index bd5cecc44123f..3dd50ac9c5b0d 100644 --- a/drivers/s390/char/vmlogrdr.c +++ b/drivers/s390/char/vmlogrdr.c @@ -531,7 +531,7 @@ static ssize_t vmlogrdr_autopurge_show(struct device *dev, char *buf) { struct vmlogrdr_priv_t *priv = dev_get_drvdata(dev); - return sprintf(buf, "%u\n", priv->autopurge); + return sysfs_emit(buf, "%u\n", priv->autopurge); } @@ -605,7 +605,7 @@ static ssize_t vmlogrdr_autorecording_show(struct device *dev, char *buf) { struct vmlogrdr_priv_t *priv = dev_get_drvdata(dev); - return sprintf(buf, "%u\n", priv->autorecording); + return sysfs_emit(buf, "%u\n", priv->autorecording); }