[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1907031018000.4456@hadrien>
Date: Wed, 3 Jul 2019 10:18:15 +0200 (CEST)
From: Julia Lawall <julia.lawall@...6.fr>
To: Markus Elfring <Markus.Elfring@....de>
cc: linux-nfs@...r.kernel.org,
Anna Schumaker <anna.schumaker@...app.com>,
Trond Myklebust <trond.myklebust@...merspace.com>,
LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] NFS: Less function calls in show_pnfs()
On Tue, 2 Jul 2019, Markus Elfring wrote:
> From: Markus Elfring <elfring@...rs.sourceforge.net>
> Date: Tue, 2 Jul 2019 16:30:53 +0200
>
> Reduce function calls for data output into a sequence.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
> ---
> fs/nfs/super.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/fs/nfs/super.c b/fs/nfs/super.c
> index f88ddac2dcdf..c301cd585b3b 100644
> --- a/fs/nfs/super.c
> +++ b/fs/nfs/super.c
> @@ -749,11 +749,10 @@ static void show_sessions(struct seq_file *m, struct nfs_server *server) {}
> #ifdef CONFIG_NFS_V4_1
> static void show_pnfs(struct seq_file *m, struct nfs_server *server)
> {
> - seq_printf(m, ",pnfs=");
> - if (server->pnfs_curr_ld)
> - seq_printf(m, "%s", server->pnfs_curr_ld->name);
> - else
> - seq_printf(m, "not configured");
> + seq_printf(m, ",pnfs=%s",
> + server->pnfs_curr_ld
> + ? server->pnfs_curr_ld->name
> + : "not configured");
Unreadable.
julia
> }
>
> static void show_implementation_id(struct seq_file *m, struct nfs_server *nfss)
> --
> 2.22.0
>
>
Powered by blists - more mailing lists