From: Mete Durlu Date: Wed, 23 Oct 2024 12:11:06 +0000 (+0200) Subject: s390/cio/css: Switch over to sysfs_emit() X-Git-Tag: v6.13-rc1~206^2~98 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ece8f29d69b4b56cb6e3fc2450cc15c0425925fb;p=thirdparty%2Fkernel%2Flinux.git 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 --- diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 7b59d20bf7850..be78a57f9bfde 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);