From patchwork Fri Jan 19 14:54:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 125171 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp326541ljf; Fri, 19 Jan 2018 06:54:36 -0800 (PST) X-Google-Smtp-Source: ACJfBovu1X+pTe1qM+oLAgg020dGXp2mNFqPuq6Gdq7oaEi9JLxTdep+JJctlRDfjesuHc3jptg9 X-Received: by 10.99.157.72 with SMTP id i69mr5096661pgd.300.1516373675878; Fri, 19 Jan 2018 06:54:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516373675; cv=none; d=google.com; s=arc-20160816; b=BcLJ7hbzC1UdD+2ERjguqrXEJhwMOMAYMZAUL5bPQhq8d/YGSVyH84eBjbV5Gy8Mp4 I1hlRYnlkKSPzA3wwcl4fdkg35Emc1PpP0xWhyWyXAH3zFmfg2Ghthi/zUUv6kk07pGA ULYIu/5QyWHhgmS11urpIOeKAyXhfAHsr+OkM3B9w6iCtw5mJ6p0V2I/AcTKMB51oFx6 iU6XAeKzG/mESfAFm0/fDzbkCzsu3cnU4OE35kaey8YwVNLS1F/ZpB5GygL6w0DYRwRh 8nqgISFbSPiL692GzczV17fz82B4Nt7X9aejPeLXL5rKw/G9MUpKg7wqRy1dcmKJFt8S fBPw== 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=rEABvl8keWPBIdWag6sctA97qNmJ9xXFMP1XKD1lBz8=; b=iVuiY3syHdnVYFM8f0ydYHAbZmPoLMBS9NjbnxttKvVVdz8lVt8w32JK2K7Ua0AwBf eTlyu3uNTGug/Lgo2UzcJZYknlQVFIL2WdcWtr8krlT9YqzZ22yGz8lQfud84Of+JlXC 8O0V5XSt/p/DTC0cEU2PlICrHcHK+qS7Px8tYDrC4Kjg6KFISexA2WVQJcZnVvZ59Gh3 ra73i9AIcz/kzQMfKQ6uIa0Pn+zCGwuLIBrSbgkjIvN7uVU5ujRx5voUNzLcCEsKrb2Y kq4CAlLozrR0dqtLSIqgUYQtLoVqwbyxHHix2tfdcxcYO49UL/v+8N0kCBIED0O18ZCG FnMQ== 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 h13si8081209pgq.776.2018.01.19.06.54.35; Fri, 19 Jan 2018 06:54:35 -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 S1755845AbeASOyc (ORCPT + 28 others); Fri, 19 Jan 2018 09:54:32 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:60818 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755793AbeASOyY (ORCPT ); Fri, 19 Jan 2018 09:54:24 -0500 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0M9XvL-1eWoN21qYh-00D3cw; Fri, 19 Jan 2018 15:54:11 +0100 From: Arnd Bergmann To: "J. Bruce Fields" , Jeff Layton Cc: Arnd Bergmann , Chuck Lever , Trond Myklebust , Kinglong Mee , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] NFSD: hide unused svcxdr_dupstr() Date: Fri, 19 Jan 2018 15:54:03 +0100 Message-Id: <20180119145410.1096453-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:8iHAv3frLtEnCg0MvY78dtnKMOWELG+1XaypxTiv9YHGTEmi0Bo cYrRspgWitrHroQYO2sfqn6OcXgBC7SzJvO4wyQwwvKpPDr+7bdWiU5btSt303Uos0K4X1e EDOPCo1z+YKC8VGcGqdmBthudObkB8MZsoStp/JWghkcChfjXYPKgsh7baBHs3R54N9hIkH K15g/FGBKxc2h2uLw/7fg== X-UI-Out-Filterresults: notjunk:1; V01:K0:4oL3zWdS6uI=:IXCsXqcWMB1dGW4qSQzZWi 90QhewmBfuJyr9Zw2SxtcpeLA9DnrY/H5c7gW071nnzC2wMFXNsQDzj4xPkiqg6g61rvR/g8c yFHGOGX+CosBOxEHiB82aIS6xgi3SLpYraBzN+43VKtC2JnlbY7JYJedp0v0uzZcXq0Zl0Dam uTgTcyinO8xSuidvXXJDV3iY3eV/L34eUzDII717J9KRJg4gWNULdYNUoq6CpwOY+t93hj5LS Ge0KS0MFqk0Mo7d5vhK62Glly3khbEh35OZz9JOmnCUAgYddOdH8PMsYbLxn1+zWIOrmRKv0D GYLt5iYDsBnQl5cewSA8Ot+aUft9mXnTYjqS8+T3KFGlq8BAz8pIUo5s4LPJWNMk8fVh0lYnl fg4RizNIihEllQbkHqWcs9cBYnwkHtAAhuRnXfXOE8L5uit0pFK/T8zubuEywHDCLg0T9sBil JvQbkWDlxUJZiQNfWFfi2/GmGRu3dQ6Cb4HLgkT1eZ1CRWrSOf8Q/Ky0gs9utDp0lupLewFxm AFuaLZA2LvT2XxMF67hj2d+p8XRoHEodm8GUuKl3d8PiS1nVcA4J7DMr3Aclwm4Rq5LZtmguj ReaAQKk/md7QPbAwBjXuSeYs/d7GV/ZXf48wBJtV+b3kug2YJolS/2i+/L29ivalu0woWdHoG aIAgB9ERU2l7ifEd4gq7dy6XbQVCbCbvQQhrpV7wxJP9wTjnAAR3f08pcE4lUTRgrXAixKRZ2 DTFMK0DVpITHZhsX9XVP1S26bPCPZvFOsNrHow== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is now only one caller left for svcxdr_dupstr() and this is inside of an #ifdef, so we can get a warning when the option is disabled: fs/nfsd/nfs4xdr.c:241:1: error: 'svcxdr_dupstr' defined but not used [-Werror=unused-function] This adds another #ifdef around the definition. Fixes: e40d99e6183e ("NFSD: Clean up symlink argument XDR decoders") Signed-off-by: Arnd Bergmann --- fs/nfsd/nfs4xdr.c | 2 ++ 1 file changed, 2 insertions(+) -- 2.9.0 Reviewed-by: Chuck Lever diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index f51c9cccaf78..374a62af6034 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -237,6 +237,7 @@ svcxdr_tmpalloc(struct nfsd4_compoundargs *argp, u32 len) * Note null-terminating in place usually isn't safe since the * buffer might end on a page boundary. */ +#ifdef CONFIG_NFSD_V4_SECURITY_LABEL static char * svcxdr_dupstr(struct nfsd4_compoundargs *argp, void *buf, u32 len) { @@ -248,6 +249,7 @@ svcxdr_dupstr(struct nfsd4_compoundargs *argp, void *buf, u32 len) p[len] = '\0'; return p; } +#endif /** * savemem - duplicate a chunk of memory for later processing