From ece8f29d69b4b56cb6e3fc2450cc15c0425925fb Mon Sep 17 00:00:00 2001 From: Mete Durlu Date: Wed, 23 Oct 2024 14:11:06 +0200 Subject: s390/cio/css: 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/css code. Signed-off-by: Mete Durlu Acked-by: Vineeth Vijayan Tested-by: Vineeth Vijayan Reviewed-by: Heiko Carstens Signed-off-by: Heiko Carstens --- drivers/s390/cio/css.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/s390') diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 7b59d20bf785..be78a57f9bfd 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c @@ -380,11 +380,11 @@ static ssize_t chpids_show(struct device *dev, for (chp = 0; chp < 8; chp++) { mask = 0x80 >> chp; if (ssd->path_mask & mask) - ret += sprintf(buf + ret, "%02x ", ssd->chpid[chp].id); + ret += sysfs_emit_at(buf, ret, "%02x ", ssd->chpid[chp].id); else - ret += sprintf(buf + ret, "00 "); + ret += sysfs_emit_at(buf, ret, "00 "); } - ret += sprintf(buf + ret, "\n"); + ret += sysfs_emit_at(buf, ret, "\n"); return ret; } static DEVICE_ATTR_RO(chpids); -- cgit v1.2.3