From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrian Bunk Subject: [2.6 patch] net/sunrpc/xdr.c: remove xdr_decode_string() Date: Wed, 14 Dec 2005 22:10:41 +0100 Message-ID: <20051214211041.GD23349@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, nfs@lists.sourceforge.net, Charles Lever , netdev@vger.kernel.org Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list2.sourceforge.net with esmtp (Exim 4.30) id 1Emdti-00016p-V7 for nfs@lists.sourceforge.net; Wed, 14 Dec 2005 13:10:50 -0800 Received: from mailout.stusta.mhn.de ([141.84.69.5]) by mail.sourceforge.net with smtp (Exim 4.44) id 1Emdtf-0007GO-9i for nfs@lists.sourceforge.net; Wed, 14 Dec 2005 13:10:50 -0800 To: neilb@cse.unsw.edu.au, trond.myklebust@fys.uio.no Sender: nfs-admin@lists.sourceforge.net Errors-To: nfs-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: Discussion of NFS under Linux development, interoperability, and testing. List-Post: List-Help: List-Subscribe: , List-Archive: This patch removes ths unused function xdr_decode_string(). Signed-off-by: Adrian Bunk Acked-by: Neil Brown Acked-by: Charles Lever --- include/linux/sunrpc/xdr.h | 1 - net/sunrpc/xdr.c | 21 --------------------- 2 files changed, 22 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; ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964978AbVLNVKq (ORCPT ); Wed, 14 Dec 2005 16:10:46 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964969AbVLNVKp (ORCPT ); Wed, 14 Dec 2005 16:10:45 -0500 Received: from mailout.stusta.mhn.de ([141.84.69.5]:31246 "HELO mailout.stusta.mhn.de") by vger.kernel.org with SMTP id S964973AbVLNVKl (ORCPT ); Wed, 14 Dec 2005 16:10:41 -0500 Date: Wed, 14 Dec 2005 22:10:41 +0100 From: Adrian Bunk To: neilb@cse.unsw.edu.au, trond.myklebust@fys.uio.no Cc: linux-kernel@vger.kernel.org, nfs@lists.sourceforge.net, Charles Lever , netdev@vger.kernel.org Subject: [2.6 patch] net/sunrpc/xdr.c: remove xdr_decode_string() Message-ID: <20051214211041.GD23349@stusta.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org This patch removes ths unused function xdr_decode_string(). Signed-off-by: Adrian Bunk Acked-by: Neil Brown Acked-by: Charles Lever --- include/linux/sunrpc/xdr.h | 1 - net/sunrpc/xdr.c | 21 --------------------- 2 files changed, 22 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;