From: Markus Elfring <Markus.Elfring@web.de>
To: linux-nfs@vger.kernel.org,
Anna Schumaker <anna.schumaker@netapp.com>,
Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] NFS: Less function calls in show_pnfs()
Date: Tue, 2 Jul 2019 16:38:06 +0200 [thread overview]
Message-ID: <d2f73c3e-a55f-5fb7-a8f8-0dc3ce8ff8a5@web.de> (raw)
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");
}
static void show_implementation_id(struct seq_file *m, struct nfs_server *nfss)
--
2.22.0
next reply other threads:[~2019-07-02 14:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-02 14:38 Markus Elfring [this message]
2019-07-03 8:18 ` [PATCH] NFS: Less function calls in show_pnfs() Julia Lawall
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=d2f73c3e-a55f-5fb7-a8f8-0dc3ce8ff8a5@web.de \
--to=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