From: Mete Durlu Date: Wed, 23 Oct 2024 12:11:05 +0000 (+0200) Subject: s390/cio/ccwgroup: Switch over to sysfs_emit() X-Git-Tag: v6.13-rc1~206^2~99 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eecab5428c168afe3f8ca21fb28c4162bf463bb0;p=thirdparty%2Fkernel%2Flinux.git s390/cio/ccwgroup: Switch over to sysfs_emit() Per Documentation/filesystems/sysfs.rst, sysfs_emit() is preferred for presenting attributes to user space in sysfs. Convert the left-over uses in the cio/ccwgroup code. Signed-off-by: Mete Durlu Acked-by: Vineeth Vijayan Tested-by: Vineeth Vijayan Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens --- diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index 66b1bdc632844..7bcf8b98b8dd9 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c @@ -147,7 +147,7 @@ static ssize_t ccwgroup_online_show(struct device *dev, online = (gdev->state == CCWGROUP_ONLINE) ? 1 : 0; - return scnprintf(buf, PAGE_SIZE, "%d\n", online); + return sysfs_emit(buf, "%d\n", online); } /*