[PATCH 1/8] loop: use sysfs_emit() in the sysfs offset show

Chaitanya Kulkarni
2022-02-14T10:35:14Z

index bdea448d2419..f6ed265d34e7 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -680,7 +680,7 @@ static ssize_t loop_attr_backing_file_show(struct loop_device *lo, char *buf)

static ssize_t loop_attr_offset_show(struct loop_device *lo, char *buf)
{
- return sprintf(buf, "%llu\n", (unsigned long long)lo->lo_offset);
+ return sysfs_emit(buf, "%llu\n", (unsigned long long)lo->lo_offset);
}

static ssize_t loop_attr_sizelimit_show(struct loop_device *lo, char *buf)
--
2.29.0