]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/vmlogrdr: Switch over to sysfs_emit()
authorMete Durlu <meted@linux.ibm.com>
Wed, 23 Oct 2024 12:11:10 +0000 (14:11 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Fri, 25 Oct 2024 14:03:26 +0000 (16:03 +0200)
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 <meted@linux.ibm.com>
Reviewed-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/char/vmlogrdr.c

index bd5cecc44123ff58f06afe163368bcf44645c624..3dd50ac9c5b0d0d682656117eb258f747ba4fe9d 100644 (file)
@@ -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);
 }