From patchwork Mon Jan 25 15:32:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101131 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp1427218lbb; Mon, 25 Jan 2016 07:33:55 -0800 (PST) X-Received: by 10.98.14.69 with SMTP id w66mr26722524pfi.144.1453736035273; Mon, 25 Jan 2016 07:33:55 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cn4si34256027pad.162.2016.01.25.07.33.54; Mon, 25 Jan 2016 07:33:55 -0800 (PST) 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 S1757446AbcAYPdx (ORCPT + 30 others); Mon, 25 Jan 2016 10:33:53 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:62944 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751758AbcAYPdu (ORCPT ); Mon, 25 Jan 2016 10:33:50 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0Luu13-1Zxhyt3A7V-0107Qq; Mon, 25 Jan 2016 16:33:22 +0100 From: Arnd Bergmann To: Petr Vandrovec Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Al Viro , linux-kernel@vger.kernel.org Subject: [PATCH] ncpfs: avoid unused variable warning Date: Mon, 25 Jan 2016 16:32:44 +0100 Message-Id: <1453735996-1958733-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:PX29kl7i0YNXfo9F7j2lZAcnHbIfjAb9ps7mmwCvE6ZawKDxx9D LkiVsGEzPVRSDB1RhZZQV0WkMTaOgEyOVGQukbm1tR3Kjg7hGuzPIJjl8pmawEW3lkiZN3c L2notjryAU33mmOXCqXQo6gdLTEHwFJjKJE9Wi1fkLrMJcxTYTIjJN1DD8Fc4WesW3eqkSt 0Lk4H+3huj9H2mTRcP7Hg== X-UI-Out-Filterresults: notjunk:1; V01:K0:2Sy2/YiZdic=:3ASBElEeJGENgbtR6Onk6x ICmtm1LxKFr9mimLMJ+EiCt8B/uKV/cZbgsOhLBUpCQwHRFXOJQqIVeTaCpOp9uRbpixguROi V3yF0tcF/ymckvo5qHwSH6fWWQuUsYINBTfoz33XoLHcIpk2JafshkbJfn4ZeA6FoPoyURlVb iwap/0BxKwPsrdOccmGtZrJW5CZtGyEsOymEbhhMgbACqfxZgeVnlzls/9y6QFK7c0lRCfEhA sjKdKfMcd1LYXtadekWiN6JUzevArIDWpW7mgLI3KgLUzCtrzqmf5JTubHok4Yv1Co8DRKHuQ Y8COkxYWHTXsvOGPmX3pVuYOgnQuDCJM3gDvkDKMJA/e2+FGcQz66JueFciarMyqspjd/MUcI uXdT9fj7t7BlfGqeyGPTNxHDIWmg07Ui4mGgQJDBiK6ayGX4QbNkaJ4+MPggD5dshs2KQd9Me eTmFfPLnY36Bpu0wszo6T7wZIvM6U3AaeJ5t4/wjaUFlp4L/Dq9Lcj2J00VcXDnHdzpmcDuh9 Sm7LsC+hrb/Uae9cAnk3MxZNI1KPxXxVSYQuLwq115lgxu9XVCgpAyFe+wvZ/oSZmPSCPPvQy 3isKFCdPvf+m7+tgNU1rh2Do2wNQC/3lwlol9p52zylUM14LbJRcp5uJFavphch6at7qVN+Cn GZgT3PY8y+nhLBFfUUZt3yWFrvExm6hWeh6Cp63ajopyzH95HEirQWJxJKQkXfonH7hU= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_NCPFS_NLS is not set, we get a harmless warning about an unused local variable, because that is only passed into a macro that does not evaluate its argument: fs/ncpfs/dir.c:136:23: warning: unused variable 'sb' [-Wunused-variable] This replaces the trivial macro with an equally trivial inline function, which avoids the warning. Signed-off-by: Arnd Bergmann Fixes: 621e155a3591 ("fs: change d_compare for rcu-walk") --- fs/ncpfs/ncplib_kernel.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.7.0 diff --git a/fs/ncpfs/ncplib_kernel.h b/fs/ncpfs/ncplib_kernel.h index 5233fbc1747a..2bbd70f26d0a 100644 --- a/fs/ncpfs/ncplib_kernel.h +++ b/fs/ncpfs/ncplib_kernel.h @@ -148,7 +148,10 @@ int ncp__io2vol(unsigned char *, unsigned int *, int ncp__vol2io(unsigned char *, unsigned int *, const unsigned char *, unsigned int, int); -#define NCP_IO_TABLE(sb) NULL +static inline struct nls_table *NCP_IO_TABLE(struct super_block *sb) +{ + return NULL; +} #define ncp_tolower(t, c) tolower(c) #define ncp_toupper(t, c) toupper(c) #define ncp_io2vol(S,m,i,n,k,U) ncp__io2vol(m,i,n,k,U)