2020-05-08 01:40:21

by Xiongfeng Wang

[permalink] [raw]
Subject: [PATCH 0/2] sunrpc: add missing newline when printing module parameters by sysfs

When I cat parameters below ''/sys/module/sunrpc/parameters/', I found the
following two parameter need a new line.

[root@hulk-202 ~]# cat /sys/module/sunrpc/parameters/pool_mode
global[root@hulk-202 ~]# cat /sys/module/sunrpc/parameters/auth_hashtable_size
16[root@hulk-202 ~]#

Xiongfeng Wang (2):
sunrpc: add missing newline when printing parameter 'pool_mode' by
sysfs
sunrpc: add missing newline when printing parameter
'auth_hashtable_size' by sysfs

net/sunrpc/auth.c | 2 +-
net/sunrpc/svc.c | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)

--
1.7.12.4


2020-05-08 01:41:39

by Xiongfeng Wang

[permalink] [raw]
Subject: [PATCH 2/2] sunrpc: add missing newline when printing parameter 'auth_hashtable_size' by sysfs

When I cat parameter
'/sys/module/sunrpc/parameters/auth_hashtable_size', it displays as
follows. It is better to add a newline for easy reading.

[root@hulk-202 ~]# cat /sys/module/sunrpc/parameters/auth_hashtable_size
16[root@hulk-202 ~]#

Signed-off-by: Xiongfeng Wang <[email protected]>
---
net/sunrpc/auth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index 5748ad0..a9f0d17 100644
--- a/net/sunrpc/auth.c
+++ b/net/sunrpc/auth.c
@@ -81,7 +81,7 @@ static int param_get_hashtbl_sz(char *buffer, const struct kernel_param *kp)
unsigned int nbits;

nbits = *(unsigned int *)kp->arg;
- return sprintf(buffer, "%u", 1U << nbits);
+ return sprintf(buffer, "%u\n", 1U << nbits);
}

#define param_check_hashtbl_sz(name, p) __param_check(name, p, unsigned int);
--
1.7.12.4