From: Markus Elfring Date: Wed, 03 Jul 2019 08:48:26 +0000 Subject: Re: [PATCH] NFS: Less function calls in show_pnfs() Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Julia Lawall , linux-nfs@vger.kernel.org Cc: Anna Schumaker , Trond Myklebust , LKML , kernel-janitors@vger.kernel.org >> +++ 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