]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/vmur: Switch over to sysfs_emit()
authorMete Durlu <meted@linux.ibm.com>
Wed, 23 Oct 2024 12:11:13 +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/vmur 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/vmur.c

index fe94dec427b6972bdfeeffb529ffabbc1b0091f3..90ba7a2b9cb41cb3aa82814c8331fd7d13a2b010 100644 (file)
@@ -345,7 +345,7 @@ static ssize_t ur_attr_reclen_show(struct device *dev,
        urd = urdev_get_from_cdev(to_ccwdev(dev));
        if (!urd)
                return -ENODEV;
-       rc = sprintf(buf, "%zu\n", urd->reclen);
+       rc = sysfs_emit(buf, "%zu\n", urd->reclen);
        urdev_put(urd);
        return rc;
 }