[PATCH 01/12] staging/lustre: Remove unused header libcfs_heap.h
With removal of libcfs/heap.c, it's header can also go away now. Signed-off-by: Oleg Drokin --- .../staging/lustre/include/linux/libcfs/libcfs.h | 1 - .../lustre/include/linux/libcfs/libcfs_heap.h | 200 - drivers/staging/lustre/lustre/include/lustre_net.h | 1 - 3 files changed, 202 deletions(-) delete mode 100644 drivers/staging/lustre/include/linux/libcfs/libcfs_heap.h diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h index 7d37bec..1122ae9 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h @@ -165,7 +165,6 @@ void cfs_get_random_bytes(void *buf, int size); #include "libcfs_kernelcomm.h" #include "libcfs_workitem.h" #include "libcfs_hash.h" -#include "libcfs_heap.h" #include "libcfs_fail.h" #include "libcfs_crypto.h" diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_heap.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_heap.h deleted file mode 100644 index bfa6d7b..000 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_heap.h +++ /dev/null @@ -1,200 +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 COPYING file that accompanied this code. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * GPL HEADER END - */ -/* - * Copyright (c) 2011 Intel Corporation - */ -/* - * libcfs/include/libcfs/heap.h - * - * Author: Eric Barton - *Liang Zhen - */ - -#ifndef __LIBCFS_HEAP_H__ -#define __LIBCFS_HEAP_H__ - -/** \defgroup heap Binary heap - * - * The binary heap is a scalable data structure created using a binary tree. It - * is capable of maintaining large sets of elements sorted usually by one or - * more element properties, but really based on anything that can be used as a - * binary predicate in order to determine the relevant ordering of any two nodes - * that belong to the set. There is no search operation, rather the intention is - * for the element of the lowest priority which will always be at the root of - * the tree (as this is an implementation of a min-heap) to be removed by users - * for consumption. - * - * Users of the heap should embed a \e cfs_binheap_node_t object instance on - * every object of the set that they wish the binary heap instance to handle, - * and (at a minimum) provide a cfs_binheap_ops_t::hop_compare() implementation - * which is used by the heap as the binary predicate during its internal sorting - * operations. - * - * The current implementation enforces no locking scheme, and so assumes the - * user caters for locking between calls to insert, delete and lookup - * operations. Since the only consumer for the data structure at this point - * are NRS policies, and these operate on a per-CPT basis, binary heap instances - * are tied to a specific CPT. - * @{ - */ - -/** - * Binary heap node. - * - * Objects of this type are embedded into objects of the ordered set that is to - * be maintained by a \e cfs_binheap_t instance. - */ -typedef struct { - /** Index into the binary tree */ - unsigned intchn_index; -} cfs_binheap_node_t; - -#define CBH_SHIFT 9 -#define CBH_SIZE (1 << CBH_SHIFT)/* # ptrs per level */ -#define CBH_MASK (CBH_SIZE - 1) -#define CBH_NOB(CBH_SIZE * sizeof(cfs_binheap_node_t *)) - -#define CBH_POISON 0xdeadbeef - -/** - * Binary heap flags. - */ -enum { - CBH_FLAG_ATOMIC_GROW= 1, -}; - -struct cfs_binheap; - -/** - * Binary heap operations. - */ -typedef struct { - /** -* Called right before inserting a node into the binary heap. -* -* Implementing this operation is optional. -* -* \param[in] h The heap -* \param[in] e The node -* -* \retval 0 success -* \retval != 0 error -*/ - int (*hop_enter)(struct cfs_binheap *h, -cfs_binheap_node_t *e); - /** -* Called right after removing a node from the binary heap. -* -* Implementing this operation is optional. -* -* \param[in] h The heap -* \param[in] e The node -*/ - void(*hop_exit)(struct
[PATCH 01/12] staging/lustre: Remove unused header libcfs_heap.h
With removal of libcfs/heap.c, it's header can also go away now. Signed-off-by: Oleg Drokin gr...@linuxhacker.ru --- .../staging/lustre/include/linux/libcfs/libcfs.h | 1 - .../lustre/include/linux/libcfs/libcfs_heap.h | 200 - drivers/staging/lustre/lustre/include/lustre_net.h | 1 - 3 files changed, 202 deletions(-) delete mode 100644 drivers/staging/lustre/include/linux/libcfs/libcfs_heap.h diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h index 7d37bec..1122ae9 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h @@ -165,7 +165,6 @@ void cfs_get_random_bytes(void *buf, int size); #include libcfs_kernelcomm.h #include libcfs_workitem.h #include libcfs_hash.h -#include libcfs_heap.h #include libcfs_fail.h #include libcfs_crypto.h diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_heap.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_heap.h deleted file mode 100644 index bfa6d7b..000 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_heap.h +++ /dev/null @@ -1,200 +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 COPYING file that accompanied this code. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * GPL HEADER END - */ -/* - * Copyright (c) 2011 Intel Corporation - */ -/* - * libcfs/include/libcfs/heap.h - * - * Author: Eric Barton e...@whamcloud.com - *Liang Zhen li...@whamcloud.com - */ - -#ifndef __LIBCFS_HEAP_H__ -#define __LIBCFS_HEAP_H__ - -/** \defgroup heap Binary heap - * - * The binary heap is a scalable data structure created using a binary tree. It - * is capable of maintaining large sets of elements sorted usually by one or - * more element properties, but really based on anything that can be used as a - * binary predicate in order to determine the relevant ordering of any two nodes - * that belong to the set. There is no search operation, rather the intention is - * for the element of the lowest priority which will always be at the root of - * the tree (as this is an implementation of a min-heap) to be removed by users - * for consumption. - * - * Users of the heap should embed a \e cfs_binheap_node_t object instance on - * every object of the set that they wish the binary heap instance to handle, - * and (at a minimum) provide a cfs_binheap_ops_t::hop_compare() implementation - * which is used by the heap as the binary predicate during its internal sorting - * operations. - * - * The current implementation enforces no locking scheme, and so assumes the - * user caters for locking between calls to insert, delete and lookup - * operations. Since the only consumer for the data structure at this point - * are NRS policies, and these operate on a per-CPT basis, binary heap instances - * are tied to a specific CPT. - * @{ - */ - -/** - * Binary heap node. - * - * Objects of this type are embedded into objects of the ordered set that is to - * be maintained by a \e cfs_binheap_t instance. - */ -typedef struct { - /** Index into the binary tree */ - unsigned intchn_index; -} cfs_binheap_node_t; - -#define CBH_SHIFT 9 -#define CBH_SIZE (1 CBH_SHIFT)/* # ptrs per level */ -#define CBH_MASK (CBH_SIZE - 1) -#define CBH_NOB(CBH_SIZE * sizeof(cfs_binheap_node_t *)) - -#define CBH_POISON 0xdeadbeef - -/** - * Binary heap flags. - */ -enum { - CBH_FLAG_ATOMIC_GROW= 1, -}; - -struct cfs_binheap; - -/** - * Binary heap operations. - */ -typedef struct { - /** -* Called right before inserting a node into the binary heap. -* -* Implementing this operation is optional. -* -* \param[in] h The heap -* \param[in] e The node -* -* \retval 0 success -* \retval != 0 error -*/ - int (*hop_enter)(struct cfs_binheap *h, -cfs_binheap_node_t *e); - /** -* Called right after removing a node from the binary heap. -* -* Implementing this operation is optional. -* -* \param[in] h The heap -* \param[in] e The node -*/ -