[PATCH 3/8] loop: use sysfs_emit() in the sysfs autoclear show

Chaitanya Kulkarni
2022-02-14T10:37:03Z

index c7fc790a6390..c049c1967ec3 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -692,7 +692,7 @@ static ssize_t loop_attr_autoclear_show(struct loop_device *lo, char *buf)
{
int autoclear = (lo->lo_flags & LO_FLAGS_AUTOCLEAR);

- return sprintf(buf, "%s\n", autoclear ? "1" : "0");
+ return sysfs_emit(buf, "%s\n", autoclear ? "1" : "0");
}

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