From: Markus Elfring <Markus.Elfring@web.de>
To: Julia Lawall <julia.lawall@lip6.fr>, linux-nfs@vger.kernel.org
Cc: 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:48:26 +0200 [thread overview]
Message-ID: <ed599239-a6a2-1cc6-14ce-d5bb41e9170f@web.de> (raw)
In-Reply-To: <alpine.DEB.2.20.1907031018000.4456@hadrien>
>> +++ 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.
* Do you find any other source code formatting more readable
for the usage of the ternary operator?
* How do you think about the general software transformation possibility
(at this place)?
Regards,
Markus
prev parent reply other threads:[~2019-07-03 8:48 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
2019-07-03 8:48 ` Markus Elfring [this message]
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=ed599239-a6a2-1cc6-14ce-d5bb41e9170f@web.de \
--to=markus.elfring@web.de \
--cc=anna.schumaker@netapp.com \
--cc=julia.lawall@lip6.fr \
--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).