LKML Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] nfsd: Use seq_putc() in two functions
@ 2020-06-18  1:56 Xu Wang
  2020-07-04 14:31 ` Chuck Lever
  0 siblings, 1 reply; 2+ messages in thread
From: Xu Wang @ 2020-06-18  1:56 UTC (permalink / raw)
  To: bfields, chuck.lever, linux-nfs; +Cc: linux-kernel

A single character (line break) should be put into a sequence.
Thus use the corresponding function "seq_putc()".

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 fs/nfsd/nfs4idmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
index 9460be8a8321..f92161ce1f97 100644
--- a/fs/nfsd/nfs4idmap.c
+++ b/fs/nfsd/nfs4idmap.c
@@ -168,7 +168,7 @@ idtoname_show(struct seq_file *m, struct cache_detail *cd, struct cache_head *h)
 			ent->id);
 	if (test_bit(CACHE_VALID, &h->flags))
 		seq_printf(m, " %s", ent->name);
-	seq_printf(m, "\n");
+	seq_putc(m, '\n');
 	return 0;
 }
 
@@ -346,7 +346,7 @@ nametoid_show(struct seq_file *m, struct cache_detail *cd, struct cache_head *h)
 			ent->name);
 	if (test_bit(CACHE_VALID, &h->flags))
 		seq_printf(m, " %u", ent->id);
-	seq_printf(m, "\n");
+	seq_putc(m, '\n');
 	return 0;
 }
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] nfsd: Use seq_putc() in two functions
  2020-06-18  1:56 [PATCH] nfsd: Use seq_putc() in two functions Xu Wang
@ 2020-07-04 14:31 ` Chuck Lever
  0 siblings, 0 replies; 2+ messages in thread
From: Chuck Lever @ 2020-07-04 14:31 UTC (permalink / raw)
  To: Xu Wang; +Cc: Bruce Fields, Linux NFS Mailing List, linux-kernel

Hi-

> On Jun 17, 2020, at 9:56 PM, Xu Wang <vulab@iscas.ac.cn> wrote:
> 
> A single character (line break) should be put into a sequence.
> Thus use the corresponding function "seq_putc()".
> 
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>

Applied to nfsd-5.9. Thanks.


> ---
> fs/nfsd/nfs4idmap.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
> index 9460be8a8321..f92161ce1f97 100644
> --- a/fs/nfsd/nfs4idmap.c
> +++ b/fs/nfsd/nfs4idmap.c
> @@ -168,7 +168,7 @@ idtoname_show(struct seq_file *m, struct cache_detail *cd, struct cache_head *h)
> 			ent->id);
> 	if (test_bit(CACHE_VALID, &h->flags))
> 		seq_printf(m, " %s", ent->name);
> -	seq_printf(m, "\n");
> +	seq_putc(m, '\n');
> 	return 0;
> }
> 
> @@ -346,7 +346,7 @@ nametoid_show(struct seq_file *m, struct cache_detail *cd, struct cache_head *h)
> 			ent->name);
> 	if (test_bit(CACHE_VALID, &h->flags))
> 		seq_printf(m, " %u", ent->id);
> -	seq_printf(m, "\n");
> +	seq_putc(m, '\n');
> 	return 0;
> }
> 
> -- 
> 2.17.1
> 

--
Chuck Lever




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18  1:56 [PATCH] nfsd: Use seq_putc() in two functions Xu Wang
2020-07-04 14:31 ` Chuck Lever

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git
	git clone --mirror https://lore.kernel.org/lkml/8 lkml/git/8.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git