From 561bd1db8620a3166100b95f25cf10f1b0211e70 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Mon, 24 Aug 2015 16:49:25 -0400 Subject: [PATCH] LU-6245 libcfs: remove linux-utils.c The source file linux-utils.c contains only empty functions of features that were never implemented. We can delete this unused code. Change-Id: Id5820a94d15b055096544120fb14b987604e733c Signed-off-by: frank zago Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/15910 Tested-by: Jenkins Reviewed-by: John L. Hammond Tested-by: Maloo Reviewed-by: Oleg Drokin --- libcfs/include/libcfs/libcfs.h | 23 ----------- libcfs/include/libcfs/linux/libcfs.h | 6 --- libcfs/libcfs/Makefile.in | 2 +- libcfs/libcfs/linux/Makefile.am | 3 +- libcfs/libcfs/linux/linux-utils.c | 76 ------------------------------------ 5 files changed, 2 insertions(+), 108 deletions(-) delete mode 100644 libcfs/libcfs/linux/linux-utils.c diff --git a/libcfs/include/libcfs/libcfs.h b/libcfs/include/libcfs/libcfs.h index 86fe687..ecd2724 100644 --- a/libcfs/include/libcfs/libcfs.h +++ b/libcfs/include/libcfs/libcfs.h @@ -194,29 +194,6 @@ sigset_t cfs_block_sigsinv(unsigned long sigs); void cfs_restore_sigs(sigset_t); void cfs_clear_sigpending(void); -int convert_server_error(__u64 ecode); -int convert_client_oflag(int cflag, int *result); - -/* - * Stack-tracing filling. - */ - -/* - * Platform-dependent data-type to hold stack frames. - */ -struct cfs_stack_trace; - -/* - * Fill @trace with current back-trace. - */ -void cfs_stack_trace_fill(struct cfs_stack_trace *trace); - -/* - * Return instruction pointer for frame @frame_no. NULL if @frame_no is - * invalid. - */ -void *cfs_stack_trace_frame(struct cfs_stack_trace *trace, int frame_no); - /* * Random number handling */ diff --git a/libcfs/include/libcfs/linux/libcfs.h b/libcfs/include/libcfs/linux/libcfs.h index 51991cb..71a7718 100644 --- a/libcfs/include/libcfs/linux/libcfs.h +++ b/libcfs/include/libcfs/linux/libcfs.h @@ -119,12 +119,6 @@ static inline int kstrtoul(const char *s, unsigned int base, unsigned long *res) } #endif /* !HAVE_KSTRTOUL */ -/* - * No stack-back-tracing in Linux for now. - */ -struct cfs_stack_trace { -}; - #ifndef WITH_WATCHDOG #define WITH_WATCHDOG #endif diff --git a/libcfs/libcfs/Makefile.in b/libcfs/libcfs/Makefile.in index c3188e6..3a4e33a 100644 --- a/libcfs/libcfs/Makefile.in +++ b/libcfs/libcfs/Makefile.in @@ -3,7 +3,7 @@ MODULES = libcfs libcfs-linux-objs := linux-tracefile.o linux-debug.o libcfs-linux-objs += linux-prim.o linux-cpu.o libcfs-linux-objs += linux-proc.o linux-curproc.o -libcfs-linux-objs += linux-utils.o linux-module.o +libcfs-linux-objs += linux-module.o libcfs-linux-objs += linux-crypto.o linux-crypto-adler.o @HAVE_CRC32_TRUE@libcfs-linux-objs += linux-crypto-crc32.o @HAVE_PCLMULQDQ_TRUE@@NEED_PCLMULQDQ_CRC32_TRUE@libcfs-linux-objs += linux-crypto-crc32pclmul.o crc32-pclmul_asm.o diff --git a/libcfs/libcfs/linux/Makefile.am b/libcfs/libcfs/linux/Makefile.am index deb41c9..eb18344 100644 --- a/libcfs/libcfs/linux/Makefile.am +++ b/libcfs/libcfs/linux/Makefile.am @@ -1,6 +1,5 @@ EXTRA_DIST = linux-debug.c linux-prim.c linux-tracefile.c \ - linux-proc.c linux-utils.c linux-module.c linux-cpu.c \ - linux-curproc.c \ + linux-proc.c linux-curproc.c linux-module.c linux-cpu.c \ linux-crypto.c linux-crypto-crc32.c linux-crypto-adler.c\ linux-crypto-crc32pclmul.c linux-crypto-crc32c-pclmul.c \ crc32-pclmul_asm.S crc32c-pcl-intel-asm_64.S inst.h diff --git a/libcfs/libcfs/linux/linux-utils.c b/libcfs/libcfs/linux/linux-utils.c deleted file mode 100644 index 2b3293c..0000000 --- a/libcfs/libcfs/linux/linux-utils.c +++ /dev/null @@ -1,76 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2014, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * libcfs/libcfs/linux/linux-utils.c - * - * Author: Phil Schwan - */ - -/* - * miscellaneous libcfs stuff - */ -#define DEBUG_SUBSYSTEM S_LNET -#include - -/* - * Convert server error code to client format. Error codes are from - * Linux errno.h, so for Linux client---identity. - */ -int convert_server_error(__u64 ecode) -{ - return ecode; -} -EXPORT_SYMBOL(convert_server_error); - -/* - * convert flag from client to server. - */ -int convert_client_oflag(int cflag, int *result) -{ - *result = cflag; - return 0; -} -EXPORT_SYMBOL(convert_client_oflag); - -void cfs_stack_trace_fill(struct cfs_stack_trace *trace) -{} - -EXPORT_SYMBOL(cfs_stack_trace_fill); - -void *cfs_stack_trace_frame(struct cfs_stack_trace *trace, int frame_no) -{ - return NULL; -} -EXPORT_SYMBOL(cfs_stack_trace_frame); -- 1.8.3.1