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: 10175477 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C3574601E7 for ; Fri, 19 Jan 2018 14:54:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C751128590 for ; Fri, 19 Jan 2018 14:54:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBE982865F; Fri, 19 Jan 2018 14:54:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9F5B128590 for ; Fri, 19 Jan 2018 14:54:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755804AbeASOyZ (ORCPT ); Fri, 19 Jan 2018 09:54:25 -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-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Chuck Lever --- fs/nfsd/nfs4xdr.c | 2 ++ 1 file changed, 2 insertions(+) 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