From patchwork Fri Sep 2 21:39:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hartley Sweeten X-Patchwork-Id: 1122992 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p82Ldhd0031113 for ; Fri, 2 Sep 2011 21:39:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756083Ab1IBVjl (ORCPT ); Fri, 2 Sep 2011 17:39:41 -0400 Received: from mail209.messagelabs.com ([216.82.255.3]:32803 "EHLO mail209.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756076Ab1IBVjl (ORCPT ); Fri, 2 Sep 2011 17:39:41 -0400 X-Env-Sender: hartleys@visionengravers.com X-Msg-Ref: server-14.tower-209.messagelabs.com!1314999568!15379333!8 X-Originating-IP: [216.166.12.32] X-StarScan-Version: 6.3.6; banners=-,-,- X-VirusChecked: Checked Received: (qmail 32016 invoked from network); 2 Sep 2011 21:39:38 -0000 Received: from out001.collaborationhost.net (HELO out001.collaborationhost.net) (216.166.12.32) by server-14.tower-209.messagelabs.com with RC4-SHA encrypted SMTP; 2 Sep 2011 21:39:38 -0000 Received: from etch.local (10.2.3.210) by smtp.collaborationhost.net (10.2.0.47) with Microsoft SMTP Server (TLS) id 8.3.137.0; Fri, 2 Sep 2011 16:39:27 -0500 From: H Hartley Sweeten To: Linux Kernel Subject: [PATCH] nfs/super.c: local functions should be static Date: Fri, 2 Sep 2011 14:39:12 -0700 User-Agent: KMail/1.9.9 CC: , MIME-Version: 1.0 Content-Disposition: inline Message-ID: <201109021439.13146.hartleys@visionengravers.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Fri, 02 Sep 2011 21:39:44 +0000 (UTC) commit ae50c0b5 "pnfs: client stats" added additional information to the output of /proc/self/mountstats. The new functions introduced are only used in this file and should be marked static. If CONFIG_NFS_V4_1 is not defined, empty stub functions are used. If CONFIG_NFS_V4 is not defined these stub functions are not used at all. Adding static for the functions results in compile warnings: fs/nfs/super.c:743: warning: 'show_sessions' defined but not used fs/nfs/super.c:756: warning: 'show_pnfs' defined but not used Fix this by adding a #ifdef CONFIG_NFS_V4 guard around the two show_ functions. Signed-off-by: H Hartley Sweeten Cc: Trond Myklebust --- -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfs/super.c b/fs/nfs/super.c index b961cea..4b07e9b 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -733,18 +733,22 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt) return 0; } + +#ifdef CONFIG_NFS_V4 #ifdef CONFIG_NFS_V4_1 -void show_sessions(struct seq_file *m, struct nfs_server *server) +static void show_sessions(struct seq_file *m, struct nfs_server *server) { if (nfs4_has_session(server->nfs_client)) seq_printf(m, ",sessions"); } #else -void show_sessions(struct seq_file *m, struct nfs_server *server) {} +static void show_sessions(struct seq_file *m, struct nfs_server *server) {} +#endif #endif +#ifdef CONFIG_NFS_V4 #ifdef CONFIG_NFS_V4_1 -void show_pnfs(struct seq_file *m, struct nfs_server *server) +static void show_pnfs(struct seq_file *m, struct nfs_server *server) { seq_printf(m, ",pnfs="); if (server->pnfs_curr_ld) @@ -752,9 +756,10 @@ void show_pnfs(struct seq_file *m, struct nfs_server *server) else seq_printf(m, "not configured"); } -#else /* CONFIG_NFS_V4_1 */ -void show_pnfs(struct seq_file *m, struct nfs_server *server) {} -#endif /* CONFIG_NFS_V4_1 */ +#else +static void show_pnfs(struct seq_file *m, struct nfs_server *server) {} +#endif +#endif static int nfs_show_devname(struct seq_file *m, struct vfsmount *mnt) {