Commit a393fd54 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

staging: lustre: libcfs: include: minor whitespace fixes



Found by the checkpatch.pl tool

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 681fc807
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -254,19 +254,19 @@ do { \
	goto label;							\
} while (0)

extern int libcfs_debug_msg(struct libcfs_debug_msg_data *msgdata,
int libcfs_debug_msg(struct libcfs_debug_msg_data *msgdata,
			    const char *format1, ...)
	__attribute__ ((format (printf, 2, 3)));

extern int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata,
int libcfs_debug_vmsg2(struct libcfs_debug_msg_data *msgdata,
			      const char *format1,
			      va_list args, const char *format2, ...)
	__attribute__ ((format (printf, 4, 5)));

/* other external symbols that tracefile provides: */
extern int cfs_trace_copyin_string(char *knl_buffer, int knl_buffer_nob,
int cfs_trace_copyin_string(char *knl_buffer, int knl_buffer_nob,
				   const char *usr_buffer, int usr_buffer_nob);
extern int cfs_trace_copyout_string(char *usr_buffer, int usr_buffer_nob,
int cfs_trace_copyout_string(char *usr_buffer, int usr_buffer_nob,
				    const char *knl_buffer, char *append);

#define LIBCFS_DEBUG_FILE_PATH_DEFAULT "/tmp/lustre-log"
+2 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ static inline void cfs_race(__u32 id)
	if (CFS_FAIL_PRECHECK(id)) {
		if (unlikely(__cfs_fail_check_set(id, 0, CFS_FAIL_LOC_NOSET))) {
			int rc;

			cfs_race_state = 0;
			CERROR("cfs_race id %x sleeping\n", id);
			cfs_wait_event_interruptible(cfs_race_waitq,
@@ -165,6 +166,7 @@ static inline void cfs_race(__u32 id)
		}
	}
}

#define CFS_RACE(id) cfs_race(id)

#endif /* _LIBCFS_FAIL_H */
+14 −19
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@
#ifndef __LIBCFS_IOCTL_H__
#define __LIBCFS_IOCTL_H__


#define LIBCFS_IOCTL_VERSION 0x0001000a

struct libcfs_ioctl_data {
@@ -90,7 +89,6 @@ do { \
	data.ioc_len = sizeof(data);		    \
} while (0)


struct libcfs_ioctl_handler {
	struct list_head item;
	int (*handle_ioctl)(unsigned int cmd, struct libcfs_ioctl_data *data);
@@ -102,11 +100,9 @@ struct libcfs_ioctl_handler {
		/* .handle_ioctl = */ func		      \
	}


/* FIXME check conflict with lustre_lib.h */
#define LIBCFS_IOC_DEBUG_MASK	     _IOWR('f', 250, long)


/* ioctls for manipulating snapshots 30- */
#define IOC_LIBCFS_TYPE		   'e'
#define IOC_LIBCFS_MIN_NR		 30
@@ -149,6 +145,7 @@ struct libcfs_ioctl_handler {
static inline int libcfs_ioctl_packlen(struct libcfs_ioctl_data *data)
{
	int len = sizeof(*data);

	len += cfs_size_round(data->ioc_inllen1);
	len += cfs_size_round(data->ioc_inllen2);
	return len;
@@ -210,11 +207,9 @@ static inline int libcfs_ioctl_is_invalid(struct libcfs_ioctl_data *data)
	return 0;
}


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__ */
+8 −9
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@
#error Do not #include this file directly. #include <linux/libcfs/libcfs.h> instead
#endif


/* KUC message header.
 * All current and future KUC messages should use this header.
 * To avoid having to include Lustre headers from libcfs, define this here.
@@ -90,12 +89,12 @@ typedef int (*libcfs_kkuc_cb_t)(__u32 data, void *cb_arg);
#define KUC_GRP_MAX	   KUC_GRP_HSM

/* Kernel methods */
extern int libcfs_kkuc_msg_put(struct file *fp, void *payload);
extern int libcfs_kkuc_group_put(int group, void *payload);
extern int libcfs_kkuc_group_add(struct file *fp, int uid, int group,
int libcfs_kkuc_msg_put(struct file *fp, void *payload);
int libcfs_kkuc_group_put(int group, void *payload);
int libcfs_kkuc_group_add(struct file *fp, int uid, int group,
				 __u32 data);
extern int libcfs_kkuc_group_rem(int uid, int group);
extern int libcfs_kkuc_group_foreach(int group, libcfs_kkuc_cb_t cb_func,
int libcfs_kkuc_group_rem(int uid, int group);
int libcfs_kkuc_group_foreach(int group, libcfs_kkuc_cb_t cb_func,
				     void *cb_arg);

#define LK_FLG_STOP 0x01
@@ -111,9 +110,9 @@ typedef struct lustre_kernelcomm {
} __attribute__((packed)) lustre_kernelcomm;

/* Userspace methods */
extern int libcfs_ukuc_start(lustre_kernelcomm *l, int groups);
extern int libcfs_ukuc_stop(lustre_kernelcomm *l);
extern int libcfs_ukuc_msg_get(lustre_kernelcomm *l, char *buf, int maxsize,
int libcfs_ukuc_start(lustre_kernelcomm *l, int groups);
int libcfs_ukuc_stop(lustre_kernelcomm *l);
int libcfs_ukuc_msg_get(lustre_kernelcomm *l, char *buf, int maxsize,
			       int transport);

#endif /* __LIBCFS_KERNELCOMM_H__ */
+17 −23
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@
#endif



/*
 * When this is on, LASSERT macro includes check for assignment used instead
 * of equality check, but doesn't have unlikely(). Turn this on from time to
@@ -58,7 +57,6 @@
 */
#define LASSERT_CHECKED (0)


#define LASSERTF(cond, fmt, ...)					\
do {									\
	if (unlikely(!(cond))) {					\
@@ -111,7 +109,6 @@ do { \
# define libcfs_kmem_read()			\
	atomic_read(&libcfs_kmemory)


#ifndef LIBCFS_VMALLOC_SIZE
#define LIBCFS_VMALLOC_SIZE	(2 << PAGE_CACHE_SHIFT) /* 2 pages */
#endif
@@ -220,7 +217,6 @@ int libcfs_debug_mark_buffer(const char *text);

void libcfs_debug_set_level(unsigned int debug_level);


/*
 * allocate per-cpu-partition data, returned value is an array of pointers,
 * variable can be indexed by CPU ID.
@@ -363,7 +359,6 @@ enum {
	CFS_PERCPT_LOCK_EX	= -1, /* negative */
};


struct cfs_percpt_lock {
	/* cpu-partition-table for this lock */
	struct cfs_cpt_table	*pcl_cptab;
@@ -380,7 +375,6 @@ cfs_percpt_lock_num(struct cfs_percpt_lock *pcl)
	return cfs_cpt_number(pcl->pcl_cptab);
}


/*
 * create a cpu-partition lock based on CPU partition table \a cptab,
 * each private lock has extra \a psize bytes padding data
@@ -400,7 +394,6 @@ void cfs_percpt_atomic_free(atomic_t **refs);
/* return sum of all percpu refs */
int cfs_percpt_atomic_summary(atomic_t **refs);


/** Compile-time assertion.

 * Check an invariant described by a constant expression at compile time by
@@ -487,6 +480,7 @@ static inline int cfs_size_round (int val)
{
	return (val + 7) & (~0x7);
}

#define HAVE_CFS_SIZE_ROUND
#endif

Loading