summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMete Durlu <meted@linux.ibm.com>2024-10-23 14:11:06 +0200
committerHeiko Carstens <hca@linux.ibm.com>2024-10-25 16:03:25 +0200
commitece8f29d69b4b56cb6e3fc2450cc15c0425925fb (patch)
tree0b4430417104183a5bb51323fb67da8b0718af32
parenteecab5428c168afe3f8ca21fb28c4162bf463bb0 (diff)
downloadlwn-ece8f29d69b4b56cb6e3fc2450cc15c0425925fb.tar.gz
lwn-ece8f29d69b4b56cb6e3fc2450cc15c0425925fb.zip
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 <meted@linux.ibm.com> Acked-by: Vineeth Vijayan <vneethv@linux.ibm.com> Tested-by: Vineeth Vijayan <vneethv@linux.ibm.com> Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
-rw-r--r--drivers/s390/cio/css.c6
1 files changed, 3 insertions, 3 deletions
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);