[2.6 patch] net/sunrpc/xdr.c: remove xdr_decode_string()

From: Adrian Bunk (bunk_at_stusta.de)
Date: 11/23/05

  • Next message: Brice Goglin: "Re: capturing oopses"
    Date:	Wed, 23 Nov 2005 02:24:18 +0100
    To: "Lever, Charles" <Charles.Lever@netapp.com>
    
    

    On Thu, Oct 06, 2005 at 07:13:14AM -0700, Lever, Charles wrote:

    > actually, can we hold off on this change? the RPC transport switch will
    > eventually need most of those EXPORT_SYMBOLs.

    Am I right to assume this will happen in the foreseeable future?

    > the only harmless change i see below is removing xdr_decode_string().

    Patch below.

    cu
    Adrian

    <-- snip -->

    This patch removes ths unused function xdr_decode_string().

    Signed-off-by: Adrian Bunk <bunk@stusta.de>

    ---
     include/linux/sunrpc/xdr.h |    1 -
     net/sunrpc/sunrpc_syms.c   |    1 -
     net/sunrpc/xdr.c           |   21 ---------------------
     3 files changed, 23 deletions(-)
    --- linux-2.6.15-rc1-mm2-full/include/linux/sunrpc/xdr.h.old	2005-11-23 02:03:01.000000000 +0100
    +++ linux-2.6.15-rc1-mm2-full/include/linux/sunrpc/xdr.h	2005-11-23 02:03:08.000000000 +0100
    @@ -91,7 +91,6 @@
     u32 *	xdr_encode_opaque_fixed(u32 *p, const void *ptr, unsigned int len);
     u32 *	xdr_encode_opaque(u32 *p, const void *ptr, unsigned int len);
     u32 *	xdr_encode_string(u32 *p, const char *s);
    -u32 *	xdr_decode_string(u32 *p, char **sp, int *lenp, int maxlen);
     u32 *	xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen);
     u32 *	xdr_encode_netobj(u32 *p, const struct xdr_netobj *);
     u32 *	xdr_decode_netobj(u32 *p, struct xdr_netobj *);
    --- linux-2.6.15-rc1-mm2-full/net/sunrpc/xdr.c.old	2005-11-23 02:03:17.000000000 +0100
    +++ linux-2.6.15-rc1-mm2-full/net/sunrpc/xdr.c	2005-11-23 02:03:27.000000000 +0100
    @@ -93,27 +93,6 @@
     }
     
     u32 *
    -xdr_decode_string(u32 *p, char **sp, int *lenp, int maxlen)
    -{
    -	unsigned int	len;
    -	char		*string;
    -
    -	if ((len = ntohl(*p++)) > maxlen)
    -		return NULL;
    -	if (lenp)
    -		*lenp = len;
    -	if ((len % 4) != 0) {
    -		string = (char *) p;
    -	} else {
    -		string = (char *) (p - 1);
    -		memmove(string, p, len);
    -	}
    -	string[len] = '\0';
    -	*sp = string;
    -	return p + XDR_QUADLEN(len);
    -}
    -
    -u32 *
     xdr_decode_string_inplace(u32 *p, char **sp, int *lenp, int maxlen)
     {
     	unsigned int	len;
    --- linux-2.6.15-rc1-mm2-full/net/sunrpc/sunrpc_syms.c.old	2005-11-23 02:03:35.000000000 +0100
    +++ linux-2.6.15-rc1-mm2-full/net/sunrpc/sunrpc_syms.c	2005-11-23 02:03:38.000000000 +0100
    @@ -120,7 +120,6 @@
     
     /* Generic XDR */
     EXPORT_SYMBOL(xdr_encode_string);
    -EXPORT_SYMBOL(xdr_decode_string);
     EXPORT_SYMBOL(xdr_decode_string_inplace);
     EXPORT_SYMBOL(xdr_decode_netobj);
     EXPORT_SYMBOL(xdr_encode_netobj);
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at  http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at  http://www.tux.org/lkml/
    

  • Next message: Brice Goglin: "Re: capturing oopses"

    Relevant Pages

    • RE: Error mounting root fs on 72:01 using Promise FastTrak TX2000 (PDC20271)
      ... I think the patch should be included in the official kernel ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
      (Linux-Kernel)
    • [2.6 patch] cdrom.c: make several functions static (fwd)
      ... The patch forwarded below still applies and compiles against ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ... There had been need of rain for many days. ...
      (Linux-Kernel)
    • [2.6 patch] some parport_pc.c cleanups (fwd)
      ... The patch forwarded below still applies and compiles against ... extern struct parport *parport_pc_probe_port (unsigned long base, ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • [2.4 patch] fix a compile warning in tipar.c (fwd)
      ... [2.4 patch] fix a compile warning in tipar.c ... send the line "unsubscribe linux-kernel" in ... Please read the FAQ at http://www.tux.org/lkml/ ...
      (Linux-Kernel)
    • RE: kernel BUG at kernel/timer.c:370!
      ... Subject: kernel BUG at kernel/timer.c:370! ... Could you please apply the below patch, wait for the problem to reoccur, ... Please read the FAQ at http://www.tux.org/lkml/ ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)