RDMA/rtrs: Use sysfs_emit instead of s*printf function for sysfs show
authorMd Haris Iqbal <haris.iqbal@ionos.com>
Wed, 22 Sep 2021 12:53:27 +0000 (14:53 +0200)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 4 Oct 2021 19:46:11 +0000 (16:46 -0300)
commit2f232912feec57d73b22cb26dcdf687846917e9e
tree593d66b65052f211efa4e464caf7ba599585e19b
parent99cfddb8a8bd57122effa808653dec83408705a6
RDMA/rtrs: Use sysfs_emit instead of s*printf function for sysfs show

sysfs_emit function was added to be aware of the PAGE_SIZE maximum of the
temporary buffer used for outputting sysfs content, so there is no
possible overruns. So replace the uses of any s*printf functions for the
sysfs show functions with sysfs_emit.

Link: https://lore.kernel.org/r/20210922125333.351454-2-haris.iqbal@ionos.com
Signed-off-by: Md Haris Iqbal <haris.iqbal@ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@ionos.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/ulp/rtrs/rtrs-clt-stats.c
drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c