[PATCH 4/8] loop: use sysfs_emit() in the sysfs partscan show

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

index c049c1967ec3..7fa6f68d7e41 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -699,7 +699,7 @@ static ssize_t loop_attr_partscan_show(struct loop_device *lo, char *buf)
{
int partscan = (lo->lo_flags & LO_FLAGS_PARTSCAN);

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

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