diff options
Diffstat (limited to 'drivers/staging/lustre/include/linux')
7 files changed, 11 insertions, 65 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/curproc.h b/drivers/staging/lustre/include/linux/libcfs/curproc.h index 507d16b..8fd47c9 100644 --- a/drivers/staging/lustre/include/linux/libcfs/curproc.h +++ b/drivers/staging/lustre/include/linux/libcfs/curproc.h @@ -44,13 +44,6 @@ #define __LIBCFS_CURPROC_H__ /* - * Portable API to access common characteristics of "current" UNIX process. - * - * Implemented in portals/include/libcfs/<os>/ - */ -int cfs_curproc_groups_nr(void); - -/* * Plus, platform-specific constant * * CFS_CURPROC_COMM_MAX, @@ -91,8 +84,6 @@ void cfs_cap_raise(cfs_cap_t cap); void cfs_cap_lower(cfs_cap_t cap); int cfs_cap_raised(cfs_cap_t cap); cfs_cap_t cfs_curproc_cap_pack(void); -void cfs_curproc_cap_unpack(cfs_cap_t cap); -int cfs_capable(cfs_cap_t cap); /* __LIBCFS_CURPROC_H__ */ #endif diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h index 9d5ee1a..e5d5db2 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h @@ -65,8 +65,6 @@ #include <linux/hash.h> -#define cfs_hash_long(val, bits) hash_long(val, bits) - /** disable debug */ #define CFS_HASH_DEBUG_NONE 0 /** record hash depth and output to console when it's too deep, diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h index 74dda57..49ba62a 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h @@ -211,10 +211,10 @@ static inline int libcfs_ioctl_is_invalid(struct libcfs_ioctl_data *data) } -extern int libcfs_register_ioctl(struct libcfs_ioctl_handler *hand); -extern int libcfs_deregister_ioctl(struct libcfs_ioctl_handler *hand); -extern int libcfs_ioctl_getdata(char *buf, char *end, void *arg); -extern int libcfs_ioctl_popdata(void *arg, void *buf, int size); +int libcfs_register_ioctl(struct libcfs_ioctl_handler *hand); +int libcfs_deregister_ioctl(struct libcfs_ioctl_handler *hand); +int libcfs_ioctl_getdata(char *buf, char *end, void *arg); +int libcfs_ioctl_popdata(void *arg, void *buf, int size); #endif /* __LIBCFS_IOCTL_H__ */ diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h index e6e417a..7cf34aa 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h @@ -41,19 +41,10 @@ #define __LIBCFS_PRIM_H__ /* - * Schedule - */ -void cfs_pause(cfs_duration_t ticks); - -/* * Timer */ typedef void (cfs_timer_func_t)(ulong_ptr_t); -void schedule_timeout_and_set_state(long, int64_t); -void init_waitqueue_entry_current(wait_queue_t *link); -int64_t waitq_timedwait(wait_queue_t *, long, int64_t); -void waitq_wait(wait_queue_t *, long); void add_wait_queue_exclusive_head(wait_queue_head_t *, wait_queue_t *); void cfs_init_timer(struct timer_list *t); diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h index a6bac9c..509dc1e 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h @@ -49,18 +49,6 @@ int cfs_strncasecmp(const char *s1, const char *s2, size_t n); /* Convert a text string to a bitmask */ int cfs_str2mask(const char *str, const char *(*bit2str)(int bit), int *oldmask, int minmask, int allmask); - -/* Allocate space for and copy an existing string. - * Must free with kfree(). - */ -char *cfs_strdup(const char *str, u_int32_t flags); - -/* safe vsnprintf */ -int cfs_vsnprintf(char *buf, size_t size, const char *fmt, va_list args); - -/* safe snprintf */ -int cfs_snprintf(char *buf, size_t size, const char *fmt, ...); - /* trim leading and trailing space characters */ char *cfs_firststr(char *str, size_t size); @@ -90,27 +78,10 @@ struct cfs_expr_list { struct list_head el_exprs; }; -static inline int -cfs_iswhite(char c) -{ - switch (c) { - case ' ': - case '\t': - case '\n': - case '\r': - return 1; - default: - break; - } - return 0; -} - char *cfs_trimwhite(char *str); int cfs_gettok(struct cfs_lstr *next, char delim, struct cfs_lstr *res); int cfs_str2num_check(char *str, int nob, unsigned *num, unsigned min, unsigned max); -int cfs_range_expr_parse(struct cfs_lstr *src, unsigned min, unsigned max, - int single_tok, struct cfs_range_expr **expr); int cfs_expr_list_match(__u32 value, struct cfs_expr_list *expr_list); int cfs_expr_list_values(struct cfs_expr_list *expr_list, int max, __u32 **values); @@ -124,7 +95,6 @@ cfs_expr_list_values_free(__u32 *values, int num) } void cfs_expr_list_free(struct cfs_expr_list *expr_list); -void cfs_expr_list_print(struct cfs_expr_list *expr_list); int cfs_expr_list_parse(char *str, int len, unsigned min, unsigned max, struct cfs_expr_list **elpp); void cfs_expr_list_free_list(struct list_head *list); diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h index 3ac2bb5..856fcfa 100644 --- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h +++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h @@ -628,7 +628,7 @@ void lnet_ni_free(lnet_ni_t *ni); static inline int lnet_nid2peerhash(lnet_nid_t nid) { - return cfs_hash_long(nid, LNET_PEER_HASH_BITS); + return hash_long(nid, LNET_PEER_HASH_BITS); } static inline struct list_head * diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h index dd8edcf..1c13ef7 100644 --- a/drivers/staging/lustre/include/linux/lnet/lib-types.h +++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h @@ -282,16 +282,14 @@ typedef struct lnet_libmd { #define LNET_MD_FLAG_AUTO_UNLINK (1 << 1) #ifdef LNET_USE_LIB_FREELIST -typedef struct -{ +typedef struct { void *fl_objs; /* single contiguous array of objects */ int fl_nobjs; /* the number of them */ int fl_objsize; /* the size (including overhead) of each of them */ struct list_head fl_list; /* where they are enqueued */ } lnet_freelist_t; -typedef struct -{ +typedef struct { struct list_head fo_list; /* enqueue on fl_list */ void *fo_contents; /* aligned contents */ } lnet_freeobj_t; @@ -312,8 +310,7 @@ typedef struct { struct lnet_ni; /* forward ref */ -typedef struct lnet_lnd -{ +typedef struct lnet_lnd { /* fields managed by portals */ struct list_head lnd_list; /* stash in the LND table */ int lnd_refcount; /* # active instances */ @@ -321,8 +318,8 @@ typedef struct lnet_lnd /* fields initialised by the LND */ unsigned int lnd_type; - int (*lnd_startup) (struct lnet_ni *ni); - void (*lnd_shutdown) (struct lnet_ni *ni); + int (*lnd_startup)(struct lnet_ni *ni); + void (*lnd_shutdown)(struct lnet_ni *ni); int (*lnd_ctl)(struct lnet_ni *ni, unsigned int cmd, void *arg); /* In data movement APIs below, payload buffers are described as a set @@ -668,8 +665,7 @@ struct lnet_msg_container { #define LNET_RC_STATE_RUNNING 1 /* started up OK */ #define LNET_RC_STATE_STOPPING 2 /* telling thread to stop */ -typedef struct -{ +typedef struct { /* CPU partition table of LNet */ struct cfs_cpt_table *ln_cpt_table; /* number of CPTs in ln_cpt_table */ |