Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp578274ybi; Wed, 3 Jul 2019 01:19:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9+LEv9lumO7GivTpCzXVOy8Kv94xPPFrnpteP0bDrpAiL8plEhMyMY7Uzzg/7TOYWNbxT X-Received: by 2002:a17:90a:f491:: with SMTP id bx17mr11455320pjb.118.1562141940090; Wed, 03 Jul 2019 01:19:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562141940; cv=none; d=google.com; s=arc-20160816; b=Np4RUbQxYenwfrIQhR9NncMsv6vjlSm5ky4XfvCuvyadH7xNlqdZq05kYD4cl84grL SaUfFOY5lmT/azQVMipY32UjtPZzkoeIytOVkfbhQra5sDrNGrPCuryUbAiX3sJSIcSb lqvJfltnmcj4foRGi2n75Dx1C2muHXsz6zeqHgsfadhSKe7kn08iSPuSjUktlTQjm0fC IktREB/x8qwkJ4bzuFhs6oul9qi3RLVfSAjKXKqz7usN9U+aKn6QJIcAo3MdCJ1ngtLL IcWwcXAUkZy6u+S7Ri/i25ODxtj74b2ukjztRXJRy5Jy1BXgvzmVkzBcofF0BXVBH8IH gKvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=ZwX+F/SiuCN9yzpA+4qZe/+67v5CB94ruc+8125c+/0=; b=pNB00uWnPjC+jq9i/oW26n6lyBZ48QNAxBc77oKT7YvBZA0e+l3IzoZtoOzq4LVqfF LX1d3RzBZ8W/FregXShZVyWLWDzt2AFNgnjIoyHQoxjKmve2+H586ddJze+yjFBuYjr/ ga5roQztxvgIBpMC7qG65bu0cfW3+3hTJZUNfI9d2SR4FSEsNwoPfgkDRcTfCN+MU0AO r79XAhGeiu2W1pDiyMwz/8riYK2nbwlpa0moRhJBI+qLISLxmI5QSlz4ua0rJnW6dM3D 8q3F3te1gOGw5jF3Kl34XAvGgnOf8NwNGgnzHOyd9T5d3kzRq+yPwaBYBumt+Y6ToFcI mQUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c70si1898910pfc.270.2019.07.03.01.18.44; Wed, 03 Jul 2019 01:19:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727350AbfGCIST (ORCPT + 99 others); Wed, 3 Jul 2019 04:18:19 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:26565 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727045AbfGCISS (ORCPT ); Wed, 3 Jul 2019 04:18:18 -0400 X-IronPort-AV: E=Sophos;i="5.63,446,1557180000"; d="scan'208";a="312254589" Received: from vaio-julia.rsr.lip6.fr ([132.227.76.33]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2019 10:18:16 +0200 Date: Wed, 3 Jul 2019 10:18:15 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Markus Elfring cc: linux-nfs@vger.kernel.org, Anna Schumaker , Trond Myklebust , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH] NFS: Less function calls in show_pnfs() In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2 Jul 2019, Markus Elfring wrote: > From: Markus Elfring > 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 > --- > 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 > >