diff mbox series

RDMA/srpt: Add a newline when printing parameter 'srpt_service_guid' by sysfs

Message ID 1589182629-27743-1-git-send-email-wangxiongfeng2@huawei.com (mailing list archive)
State New, archived
Headers show
Series RDMA/srpt: Add a newline when printing parameter 'srpt_service_guid' by sysfs | expand

Commit Message

Xiongfeng Wang May 11, 2020, 7:37 a.m. UTC
When I cat module parameter 'srpt_service_guid', it displays as follows.
It is better to add a newline for easy reading.

[root@hulk-202 ~]# cat /sys/module/ib_srpt/parameters/srpt_service_guid
0x0205cdfffe8346b9[root@hulk-202 ~]#

Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
---
 drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jason Gunthorpe May 17, 2020, 11:39 p.m. UTC | #1
On Mon, May 11, 2020 at 03:37:09PM +0800, Xiongfeng Wang wrote:
> When I cat module parameter 'srpt_service_guid', it displays as follows.
> It is better to add a newline for easy reading.
> 
> [root@hulk-202 ~]# cat /sys/module/ib_srpt/parameters/srpt_service_guid
> 0x0205cdfffe8346b9[root@hulk-202 ~]#
> 
> Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
> ---
>  drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/ulp/srpt/ib_srpt.c b/drivers/infiniband/ulp/srpt/ib_srpt.c
index 9855274..79b6341 100644
--- a/drivers/infiniband/ulp/srpt/ib_srpt.c
+++ b/drivers/infiniband/ulp/srpt/ib_srpt.c
@@ -81,7 +81,7 @@ 
 
 static int srpt_get_u64_x(char *buffer, const struct kernel_param *kp)
 {
-	return sprintf(buffer, "0x%016llx", *(u64 *)kp->arg);
+	return sprintf(buffer, "0x%016llx\n", *(u64 *)kp->arg);
 }
 module_param_call(srpt_service_guid, NULL, srpt_get_u64_x, &srpt_service_guid,
 		  0444);