linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: linux-nfs@vger.kernel.org,
	Anna Schumaker <anna.schumaker@netapp.com>,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] NFS: Less function calls in show_pnfs()
Date: Wed, 3 Jul 2019 10:18:15 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1907031018000.4456@hadrien> (raw)
In-Reply-To: <d2f73c3e-a55f-5fb7-a8f8-0dc3ce8ff8a5@web.de>



On Tue, 2 Jul 2019, Markus Elfring wrote:

> From: Markus Elfring <elfring@users.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@users.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
>
>

  reply	other threads:[~2019-07-03  8:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-02 14:38 [PATCH] NFS: Less function calls in show_pnfs() Markus Elfring
2019-07-03  8:18 ` Julia Lawall [this message]
2019-07-03  8:48   ` Markus Elfring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1907031018000.4456@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=Markus.Elfring@web.de \
    --cc=anna.schumaker@netapp.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).