From patchwork Fri May 25 15:16:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 136941 Delivered-To: patch@linaro.org Received: by 2002:a2e:9706:0:0:0:0:0 with SMTP id r6-v6csp3719721lji; Fri, 25 May 2018 08:16:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqpHp7KXAjv8QleRYDrbSdcIPc4/ax6O7EoGmPc1GBPNmYB10ccgBGyPnnNk1vSGPnsAsNx X-Received: by 2002:a62:5fc5:: with SMTP id t188-v6mr2993620pfb.214.1527261385271; Fri, 25 May 2018 08:16:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527261385; cv=none; d=google.com; s=arc-20160816; b=jp7bj96qV+X/klY3cJpznvfLFJg8Hu0Bu2zOYke9nk+rCmTTw0Wzu6Vmf5oXnIrLYE 2fiSNAb/8h29upR9wSaL3XrRtKYL1hAGulNd23xfCLJc98hs5dQfSTkAZVVN9WIieW+4 74XBo6nlEhbS535+qLMyLpKWp+JsXze/6jSsUpr+ZUHOkYJDPJWuouhObj+56OreudRi PF2/igl3oVJoQHUhDuDAMO0oV/eAwrnlzHMSa2cBB27Ai00N3tReVoRpveV2SmK2RELx xkxoHdJRlh55+NjPzMthGTC1CVXeFbhvFzLTiDbGW4h8TuzTN6uljPz3eo0qzLssTC7f YVWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=UtH79czeui9YfoDUj1vVETiVfm22ky8yjY76diPl2Ak=; b=S3I3L2dCBkda62bKWjLvJ0LHffnNlhOSxdjQGJ3rH6tgSWeUJ4X/M//5NZRhD0NxLQ Ozz7pBVvsaE79rCMTofkwlkfM5BOevOydT4zW2XBqKArdpJ8pNVc3NuARwg3SobVqzuv TVm7CYHP8avIO2QSIyIDq3QkKIAc3eId22b4BVsr9W/Ed1DfKPeiHbFJYEfilxILGjuG nxmhrpjcGD/S3bGEF5+nCPxT3Y+L3IAeeZtMoj7l/e700uZg5lvc5ZpJQt9t9nv213N5 CP22DCBXbM5rXogry0M1zY+Iy4FwK/LrdfNLAb/YSoZtnEG6UQapL43FTgniPO83GB4p JlTQ== 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 203-v6si23589758pfa.60.2018.05.25.08.16.24; Fri, 25 May 2018 08:16:25 -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 S936337AbeEYPQW (ORCPT + 30 others); Fri, 25 May 2018 11:16:22 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:42163 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936219AbeEYPQV (ORCPT ); Fri, 25 May 2018 11:16:21 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0LdQdm-1g4srE0Axm-00inOR; Fri, 25 May 2018 17:16:14 +0200 From: Arnd Bergmann To: Al Viro Cc: Arnd Bergmann , Christoph Hellwig , "Darrick J. Wong" , linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] xfs, proc: hide unused xfs procfs helpers Date: Fri, 25 May 2018 17:16:04 +0200 Message-Id: <20180525151612.2408651-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:KtKvff3PowapyjyoDc7YePxu+538PDk/vmtiZvTlzkZ9jp3jNqQ gFIIPiaP5OVaSnYTjVpL6Afp0UZgJh8hy3I4ITJbMJ58R8PGU/pL/THI63R1am6/WFPG/Ma e5QT8bmPMPBa7Upqg+o+9+2GefQCQO7AYaAnYdnuZFZJLmz3rV4/1rduXO7Tpg9tcPL93cD TIevAQjTXU50apx9tAu8Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:KYjekaY/82g=:aC0OrA92Kqr3ibM1KDrG0a obzMphQ4lU6V6m1+Dc7dguLWIBZOk6+gMsHzxBryJR685rnXlFkEhHsoAffQbUdKm+Tt0TnKB FEISNvp1EM5/VFcn0hw5zO4OvERXZNt6S7TbMPYrU5eraL4bcdmd/Vg4bzuut5Z9Y9ZxVOXz6 gdeVmHZ0tOJfHP93//T64RKrArdB5fFjPqHD7/9dQmiMEwXWCMOiWTJqOvV2szG3vcWOZHp8I 5+a0QcM5jZ3ODqKqkDnzyI8RhMlkS/19bthrm3mIZ08hcgU6HXNy68jeJGuByy7WCdOAi4VUg 1xbjdDM7WPgWOFnPS4eYb+ocZhCJRye2zgfViJ8YyYIq6WxnVCoQPq3zHmIYhINc7vbcRWZRA 2SzfN5btq9m4S4+TgjubgAHbsEpbl1JQUealdkABRY//kRICBPzo6dJnBsAEIlU8cwf2IuyJJ 4r6RUKW9Rll9LdbTyHaiVq6kp763pbe5Wx949PLyHJhLEztrgiAsSpbN2WDWfnYGv2TboqYcH xX8VfuSFk+5E7AzR2hVkKSVi0TRMK7WjaHwJWIOOTEzUq194E3wyvC8/27Xq/vJDrKkYtknAa zheEPAuEDFVmUtr6+vz2NsSMIvVgV400exqA5Jygwezq4YmUvhovAJM3UWCSbzF9sY0vcaFXp Khpxyyw//zOBWebEj5zjKz0eTbN2gkiKm6sc+VC/A3TFVOqS5BoafrC/ECDiEn1KDASQ= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org These two functions now trigger a warning when CONFIG_PROC_FS is disabled: fs/xfs/xfs_stats.c:128:12: error: 'xqmstat_proc_show' defined but not used [-Werror=unused-function] static int xqmstat_proc_show(struct seq_file *m, void *v) ^~~~~~~~~~~~~~~~~ fs/xfs/xfs_stats.c:118:12: error: 'xqm_proc_show' defined but not used [-Werror=unused-function] static int xqm_proc_show(struct seq_file *m, void *v) ^~~~~~~~~~~~~ Previously, they were referenced from an unused 'static const' structure, which is silently dropped by gcc. We can address the warning by adding the same #ifdef around them that hides the reference. Fixes: 3f3942aca6da ("proc: introduce proc_create_single{,_data}") Cc: Christoph Hellwig Signed-off-by: Arnd Bergmann --- The warning was caused by a patch in Al's VFS tree, so the fix needs to go through the same one. --- fs/xfs/xfs_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 Reviewed-by: Christoph Hellwig diff --git a/fs/xfs/xfs_stats.c b/fs/xfs/xfs_stats.c index 04762a72e344..1cc79907b377 100644 --- a/fs/xfs/xfs_stats.c +++ b/fs/xfs/xfs_stats.c @@ -113,6 +113,7 @@ void xfs_stats_clearall(struct xfsstats __percpu *stats) } } +#ifdef CONFIG_PROC_FS /* legacy quota interfaces */ #ifdef CONFIG_XFS_QUOTA static int xqm_proc_show(struct seq_file *m, void *v) @@ -137,7 +138,6 @@ static int xqmstat_proc_show(struct seq_file *m, void *v) } #endif /* CONFIG_XFS_QUOTA */ -#ifdef CONFIG_PROC_FS int xfs_init_procfs(void) {