staging: lustre: libcfs: include: minor whitespace fixes
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Jul 2014 05:47:02 +0000 (22:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Jul 2014 05:47:02 +0000 (22:47 -0700)
Found by the checkpatch.pl tool

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20 files changed:
drivers/staging/lustre/include/linux/libcfs/curproc.h
drivers/staging/lustre/include/linux/libcfs/libcfs.h
drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h
drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h
drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h
drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h
drivers/staging/lustre/include/linux/libcfs/libcfs_kernelcomm.h
drivers/staging/lustre/include/linux/libcfs/libcfs_private.h
drivers/staging/lustre/include/linux/libcfs/libcfs_time.h
drivers/staging/lustre/include/linux/libcfs/linux/kp30.h
drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h
drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h
drivers/staging/lustre/include/linux/libcfs/linux/linux-lock.h
drivers/staging/lustre/include/linux/libcfs/linux/linux-mem.h
drivers/staging/lustre/include/linux/libcfs/linux/linux-prim.h
drivers/staging/lustre/include/linux/libcfs/linux/linux-tcpip.h
drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h
drivers/staging/lustre/include/linux/libcfs/linux/portals_compat25.h
drivers/staging/lustre/include/linux/libcfs/lucache.h
drivers/staging/lustre/include/linux/libcfs/params_tree.h

index b314f34d2e680def0de187f00eaa6c917b287be4..1edfca58c1c60d0c6e98bb1c510c3822bf543959 100644 (file)
@@ -73,7 +73,7 @@ typedef __u32 cfs_cap_t;
                         (1 << CFS_CAP_DAC_OVERRIDE) |    \
                         (1 << CFS_CAP_DAC_READ_SEARCH) |       \
                         (1 << CFS_CAP_FOWNER) |                \
-                        (1 << CFS_CAP_FSETID ) |              \
+                        (1 << CFS_CAP_FSETID) |               \
                         (1 << CFS_CAP_LINUX_IMMUTABLE) |       \
                         (1 << CFS_CAP_SYS_ADMIN) |          \
                         (1 << CFS_CAP_SYS_BOOT) |            \
index a8b84ff4ee06fb4dd6f0c9a765630b39f48f94da..42e453cbd1d499dfd81cd3dcac2e569d6cf68326 100644 (file)
 #include "curproc.h"
 
 #ifndef offsetof
-# define offsetof(typ,memb) ((long)(long_ptr_t)((char *)&(((typ *)0)->memb)))
+# define offsetof(typ, memb) ((long)(long_ptr_t)((char *)&(((typ *)0)->memb)))
 #endif
 
 #ifndef ARRAY_SIZE
-#define ARRAY_SIZE(a) ((sizeof (a)) / (sizeof ((a)[0])))
+#define ARRAY_SIZE(a) ((sizeof(a)) / (sizeof((a)[0])))
 #endif
 
 #if !defined(swap)
-#define swap(x,y) do { typeof(x) z = x; x = y; y = z; } while (0)
+#define swap(x, y) do { typeof(x) z = x; x = y; y = z; } while (0)
 #endif
 
 #if !defined(container_of)
index b270d84def98a823bbf30a5f9ce86aeb8b5763b5..b43c9ad8fd154228df59ccc82667bf9e3ea0d85b 100644 (file)
@@ -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"
index 8393c2703ce65e6db90ff8d3c630c5f09b9d761f..1934ec20e5364171e2751230c29d685660a650bd 100644 (file)
@@ -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 */
index 954164361ca405231d42a85366d4086e9c158d48..375586bf7312012128f61be7b64e688a765706a3 100644 (file)
@@ -628,21 +628,21 @@ static inline int cfs_hash_bd_dec_and_lock(struct cfs_hash *hs, struct cfs_hash_
 }
 
 static inline struct hlist_head *cfs_hash_bd_hhead(struct cfs_hash *hs,
-                                                 struct cfs_hash_bd *bd)
+                                                  struct cfs_hash_bd *bd)
 {
        return hs->hs_hops->hop_hhead(hs, bd);
 }
 
 struct hlist_node *cfs_hash_bd_lookup_locked(struct cfs_hash *hs,
-                                           struct cfs_hash_bd *bd, const void *key);
+                                            struct cfs_hash_bd *bd, const void *key);
 struct hlist_node *cfs_hash_bd_peek_locked(struct cfs_hash *hs,
-                                         struct cfs_hash_bd *bd, const void *key);
+                                          struct cfs_hash_bd *bd, const void *key);
 struct hlist_node *cfs_hash_bd_findadd_locked(struct cfs_hash *hs,
-                                            struct cfs_hash_bd *bd, const void *key,
+                                             struct cfs_hash_bd *bd, const void *key,
                                             struct hlist_node *hnode,
                                             int insist_add);
 struct hlist_node *cfs_hash_bd_finddel_locked(struct cfs_hash *hs,
-                                            struct cfs_hash_bd *bd, const void *key,
+                                             struct cfs_hash_bd *bd, const void *key,
                                             struct hlist_node *hnode);
 
 /**
@@ -661,21 +661,21 @@ static inline void cfs_hash_dual_bd_get_and_lock(struct cfs_hash *hs, const void
 }
 
 struct hlist_node *cfs_hash_dual_bd_lookup_locked(struct cfs_hash *hs,
-                                                struct cfs_hash_bd *bds,
+                                                 struct cfs_hash_bd *bds,
                                                 const void *key);
 struct hlist_node *cfs_hash_dual_bd_findadd_locked(struct cfs_hash *hs,
-                                                 struct cfs_hash_bd *bds,
+                                                  struct cfs_hash_bd *bds,
                                                  const void *key,
                                                  struct hlist_node *hnode,
                                                  int insist_add);
 struct hlist_node *cfs_hash_dual_bd_finddel_locked(struct cfs_hash *hs,
-                                                 struct cfs_hash_bd *bds,
+                                                  struct cfs_hash_bd *bds,
                                                  const void *key,
                                                  struct hlist_node *hnode);
 
 /* Hash init/cleanup functions */
 struct cfs_hash *cfs_hash_create(char *name, unsigned cur_bits, unsigned max_bits,
-                           unsigned bkt_bits, unsigned extra_bytes,
+                                unsigned bkt_bits, unsigned extra_bytes,
                            unsigned min_theta, unsigned max_theta,
                            cfs_hash_ops_t *ops, unsigned flags);
 
index 49ba62a4daa8e54bf0cea34c74f317198df61fa5..87f2d901c7c1be44a7ad54ae72a72036ce8e0431 100644 (file)
@@ -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;
@@ -157,64 +154,62 @@ static inline int libcfs_ioctl_packlen(struct libcfs_ioctl_data *data)
 static inline int libcfs_ioctl_is_invalid(struct libcfs_ioctl_data *data)
 {
        if (data->ioc_len > (1<<30)) {
-               CERROR ("LIBCFS ioctl: ioc_len larger than 1<<30\n");
+               CERROR("LIBCFS ioctl: ioc_len larger than 1<<30\n");
                return 1;
        }
        if (data->ioc_inllen1 > (1<<30)) {
-               CERROR ("LIBCFS ioctl: ioc_inllen1 larger than 1<<30\n");
+               CERROR("LIBCFS ioctl: ioc_inllen1 larger than 1<<30\n");
                return 1;
        }
        if (data->ioc_inllen2 > (1<<30)) {
-               CERROR ("LIBCFS ioctl: ioc_inllen2 larger than 1<<30\n");
+               CERROR("LIBCFS ioctl: ioc_inllen2 larger than 1<<30\n");
                return 1;
        }
        if (data->ioc_inlbuf1 && !data->ioc_inllen1) {
-               CERROR ("LIBCFS ioctl: inlbuf1 pointer but 0 length\n");
+               CERROR("LIBCFS ioctl: inlbuf1 pointer but 0 length\n");
                return 1;
        }
        if (data->ioc_inlbuf2 && !data->ioc_inllen2) {
-               CERROR ("LIBCFS ioctl: inlbuf2 pointer but 0 length\n");
+               CERROR("LIBCFS ioctl: inlbuf2 pointer but 0 length\n");
                return 1;
        }
        if (data->ioc_pbuf1 && !data->ioc_plen1) {
-               CERROR ("LIBCFS ioctl: pbuf1 pointer but 0 length\n");
+               CERROR("LIBCFS ioctl: pbuf1 pointer but 0 length\n");
                return 1;
        }
        if (data->ioc_pbuf2 && !data->ioc_plen2) {
-               CERROR ("LIBCFS ioctl: pbuf2 pointer but 0 length\n");
+               CERROR("LIBCFS ioctl: pbuf2 pointer but 0 length\n");
                return 1;
        }
        if (data->ioc_plen1 && !data->ioc_pbuf1) {
-               CERROR ("LIBCFS ioctl: plen1 nonzero but no pbuf1 pointer\n");
+               CERROR("LIBCFS ioctl: plen1 nonzero but no pbuf1 pointer\n");
                return 1;
        }
        if (data->ioc_plen2 && !data->ioc_pbuf2) {
-               CERROR ("LIBCFS ioctl: plen2 nonzero but no pbuf2 pointer\n");
+               CERROR("LIBCFS ioctl: plen2 nonzero but no pbuf2 pointer\n");
                return 1;
        }
-       if ((__u32)libcfs_ioctl_packlen(data) != data->ioc_len ) {
-               CERROR ("LIBCFS ioctl: packlen != ioc_len\n");
+       if ((__u32)libcfs_ioctl_packlen(data) != data->ioc_len) {
+               CERROR("LIBCFS ioctl: packlen != ioc_len\n");
                return 1;
        }
        if (data->ioc_inllen1 &&
            data->ioc_bulk[data->ioc_inllen1 - 1] != '\0') {
-               CERROR ("LIBCFS ioctl: inlbuf1 not 0 terminated\n");
+               CERROR("LIBCFS ioctl: inlbuf1 not 0 terminated\n");
                return 1;
        }
        if (data->ioc_inllen2 &&
            data->ioc_bulk[cfs_size_round(data->ioc_inllen1) +
                           data->ioc_inllen2 - 1] != '\0') {
-               CERROR ("LIBCFS ioctl: inlbuf2 not 0 terminated\n");
+               CERROR("LIBCFS ioctl: inlbuf2 not 0 terminated\n");
                return 1;
        }
        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__ */
index 037ae8a6d5319ee230fb9cb5de131b115db2cf43..f19a121a37cd5fb4f8a090284eea39f22165af0e 100644 (file)
@@ -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__ */
index c184746cee4c5ab593554b5e7cd2902e145ab461..de64f1dc790cfc9d5820f158b4a67007e2c4cf8e 100644 (file)
@@ -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))) {                                        \
@@ -80,18 +78,18 @@ do {                                                                        \
  */
 # define LINVRNT(exp) LASSERT(exp)
 #else
-# define LINVRNT(exp) ((void)sizeof!!(exp))
+# define LINVRNT(exp) ((void)sizeof !!(exp))
 #endif
 
 #define KLASSERT(e) LASSERT(e)
 
-void lbug_with_loc(struct libcfs_debug_msg_data *) __attribute__((noreturn));
+void lbug_with_loc(struct libcfs_debug_msg_data *)__attribute__((noreturn));
 
 #define LBUG()                                                   \
 do {                                                               \
        LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, D_EMERG, NULL);          \
        lbug_with_loc(&msgdata);                                        \
-} while(0)
+} while (0)
 
 extern atomic_t libcfs_kmemory;
 /*
@@ -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.
@@ -339,8 +335,8 @@ do {                                                            \
 #define LASSERT_ATOMIC_ZERO(a)           LASSERT_ATOMIC_EQ(a, 0)
 #define LASSERT_ATOMIC_POS(a)             LASSERT_ATOMIC_GT(a, 0)
 
-#define CFS_ALLOC_PTR(ptr)      LIBCFS_ALLOC(ptr, sizeof (*(ptr)));
-#define CFS_FREE_PTR(ptr)       LIBCFS_FREE(ptr, sizeof (*(ptr)));
+#define CFS_ALLOC_PTR(ptr)      LIBCFS_ALLOC(ptr, sizeof(*(ptr)));
+#define CFS_FREE_PTR(ptr)       LIBCFS_FREE(ptr, sizeof(*(ptr)));
 
 /*
  * percpu partition lock
@@ -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
@@ -415,7 +408,7 @@ int cfs_percpt_atomic_summary(atomic_t **refs);
  *       value  after  conversion...
  *
  */
-#define CLASSERT(cond) do {switch(42) {case (cond): case 0: break;}} while (0)
+#define CLASSERT(cond) do {switch (42) {case (cond): case 0: break; } } while (0)
 
 /* support decl needed both by kernel and liblustre */
 int     libcfs_isknown_lnd(int type);
@@ -440,11 +433,11 @@ int        cfs_match_nid(lnet_nid_t nid, struct list_head *list);
 /** extract the network part of an lnet_nid_t */
 #define LNET_NIDNET(nid)       ((__u32)(((nid) >> 32)) & 0xffffffff)
 /** make an lnet_nid_t from a network part and an address part */
-#define LNET_MKNID(net,addr)   ((((__u64)(net))<<32)|((__u64)(addr)))
+#define LNET_MKNID(net, addr)   ((((__u64)(net))<<32)|((__u64)(addr)))
 /* how net encodes type:number */
 #define LNET_NETNUM(net)       ((net) & 0xffff)
 #define LNET_NETTYP(net)       (((net) >> 16) & 0xffff)
-#define LNET_MKNET(typ,num)    ((((__u32)(typ))<<16)|((__u32)(num)))
+#define LNET_MKNET(typ, num)    ((((__u32)(typ))<<16)|((__u32)(num)))
 /** @} lnet_addr */
 
 /* max value for numeric network address */
@@ -469,24 +462,25 @@ struct libcfs_device_userstate
 
 /* what used to be in portals_lib.h */
 #ifndef MIN
-# define MIN(a,b) (((a)<(b)) ? (a): (b))
+# define MIN(a, b) (((a) < (b)) ? (a) : (b))
 #endif
 #ifndef MAX
-# define MAX(a,b) (((a)>(b)) ? (a): (b))
+# define MAX(a, b) (((a) > (b)) ? (a) : (b))
 #endif
 
-#define MKSTR(ptr) ((ptr))? (ptr) : ""
+#define MKSTR(ptr) ((ptr)) ? (ptr) : ""
 
-static inline int cfs_size_round4 (int val)
+static inline int cfs_size_round4(int val)
 {
        return (val + 3) & (~0x3);
 }
 
 #ifndef HAVE_CFS_SIZE_ROUND
-static inline int cfs_size_round (int val)
+static inline int cfs_size_round(int val)
 {
        return (val + 7) & (~0x7);
 }
+
 #define HAVE_CFS_SIZE_ROUND
 #endif
 
@@ -525,21 +519,21 @@ static inline unsigned int cfs_power2_roundup(unsigned int val)
        return val;
 }
 
-#define LOGL(var,len,ptr)                                     \
+#define LOGL(var, len, ptr)                                   \
 do {                                                       \
        if (var)                                                \
                memcpy((char *)ptr, (const char *)var, len);    \
        ptr += cfs_size_round(len);                          \
 } while (0)
 
-#define LOGU(var,len,ptr)                                     \
+#define LOGU(var, len, ptr)                                   \
 do {                                                       \
        if (var)                                                \
                memcpy((char *)var, (const char *)ptr, len);    \
        ptr += cfs_size_round(len);                          \
 } while (0)
 
-#define LOGL0(var,len,ptr)                           \
+#define LOGL0(var, len, ptr)                         \
 do {                                               \
        if (!len)                                      \
                break;                            \
index 4bdd77163d5e8b0a5f909841a73c9243604c16c4..bb9e59e41a8cbc8f9496828a349a4d2064cd7968 100644 (file)
@@ -63,7 +63,6 @@ static inline int cfs_time_aftereq(cfs_time_t t1, cfs_time_t t2)
        return cfs_time_beforeq(t2, t1);
 }
 
-
 static inline cfs_time_t cfs_time_shift(int seconds)
 {
        return cfs_time_add(cfs_time_current(), cfs_time_seconds(seconds));
@@ -72,7 +71,7 @@ static inline cfs_time_t cfs_time_shift(int seconds)
 static inline long cfs_timeval_sub(struct timeval *large, struct timeval *small,
                                   struct timeval *result)
 {
-       long r = (long) (
+       long r = (long)(
                (large->tv_sec - small->tv_sec) * ONE_MILLION +
                (large->tv_usec - small->tv_usec));
        if (result != NULL) {
@@ -87,7 +86,7 @@ static inline void cfs_slow_warning(cfs_time_t now, int seconds, char *msg)
        if (cfs_time_after(cfs_time_current(),
                           cfs_time_add(now, cfs_time_seconds(15))))
                CERROR("slow %s "CFS_TIME_T" sec\n", msg,
-                      cfs_duration_sec(cfs_time_sub(cfs_time_current(),now)));
+                      cfs_duration_sec(cfs_time_sub(cfs_time_current(), now)));
 }
 
 #define CFS_RATELIMIT(seconds)                           \
index f7085c402c1e7d4b4a3560c1afeb8e3e4cc9ddc9..7b8107b133de4e40c6cb7ed3880da2f9beab1b9f 100644 (file)
@@ -37,7 +37,6 @@
 #ifndef __LIBCFS_LINUX_KP30_H__
 #define __LIBCFS_LINUX_KP30_H__
 
-
 #include <linux/kernel.h>
 #include <linux/mm.h>
 #include <linux/string.h>
index d2f7c19cfa36376bd9bebfd88c46728dff374c8d..bc7c8a7f0f0f9ef5db95bf489e787266cebd8c6e 100644 (file)
@@ -42,7 +42,6 @@
 #endif
 
 
-
 #include <stdarg.h>
 #include "linux-cpu.h"
 #include "linux-time.h"
@@ -63,7 +62,7 @@
 #define LUSTRE_TRACE_SIZE (THREAD_SIZE >> 5)
 
 #if !defined(__x86_64__)
-# ifdef  __ia64__
+# ifdef __ia64__
 #  define CDEBUG_STACK() (THREAD_SIZE -                                 \
                          ((unsigned long)__builtin_dwarf_cfa() &       \
                           (THREAD_SIZE - 1)))
@@ -89,7 +88,7 @@ do {                                                              \
 } while (0)
 #define CFS_CHECK_STACK(msgdata, mask, cdls)  __CHECK_STACK(msgdata, mask, cdls)
 #else /* __x86_64__ */
-#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while(0)
+#define CFS_CHECK_STACK(msgdata, mask, cdls) do {} while (0)
 #define CDEBUG_STACK() (0L)
 #endif /* __x86_64__ */
 
@@ -103,7 +102,7 @@ do {                                                                    \
  *
  * Implementation is in linux-curproc.c
  */
-#define CFS_CURPROC_COMM_MAX (sizeof ((struct task_struct *)0)->comm)
+#define CFS_CURPROC_COMM_MAX (sizeof((struct task_struct *)0)->comm)
 
 #include <linux/capability.h>
 
@@ -116,6 +115,4 @@ typedef long long_ptr_t;
 #endif
 
 
-
-
 #endif /* _LINUX_LIBCFS_H */
index 8dd354d51606c02528e433fe3c112e21f5c2b1c2..fbe1c0b47883369c3a847cc809364578f4b855e3 100644 (file)
@@ -42,7 +42,6 @@
 #error Do not #include this file directly. #include <linux/libcfs/libcfs.h> instead
 #endif
 
-
 #include <linux/cpu.h>
 #include <linux/cpuset.h>
 #include <linux/topology.h>
index b75e401d9a973c883f6c4785907e210f2c226991..7581a14e884fcded4f5774641980f47110945d1d 100644 (file)
@@ -45,7 +45,6 @@
 #error Do not #include this file directly. #include <linux/libcfs/libcfs.h> instead
 #endif
 
-
 #include <linux/mutex.h>
 
 /*
@@ -81,8 +80,6 @@
  */
 
 
-
-
 /*
  * rw_semaphore "implementation" (use Linux kernel's primitives)
  *
  * - up_write(x)
  */
 
-
 #define fini_rwsem(s)          do {} while (0)
 
-
 /*
  * rwlock_t "implementation" (use Linux kernel's primitives)
  *
  * - RW_LOCK_UNLOCKED
  */
 
-
 #ifndef DEFINE_RWLOCK
 #define DEFINE_RWLOCK(lock)    rwlock_t lock = __RW_LOCK_UNLOCKED(lock)
 #endif
@@ -170,7 +164,6 @@ struct lock_class_key {
 /* This has to be a macro, so that `subclass' can be undefined in kernels
  * that do not support lockdep. */
 
-
 static inline void lockdep_off(void)
 {
 }
@@ -200,5 +193,4 @@ static inline void lockdep_on(void)
 #endif
 #endif /* CONFIG_DEBUG_LOCK_ALLOC */
 
-
 #endif /* __LIBCFS_LINUX_CFS_LOCK_H__ */
index ccee5c3e4142dac9dad88ecfd2aa65ad38c95b85..b15653f7383a51d653dbe9f5fe980dc27d8ad677 100644 (file)
@@ -45,7 +45,6 @@
 #error Do not #include this file directly. #include <linux/libcfs/libcfs.h> instead
 #endif
 
-
 #include <linux/mm.h>
 #include <linux/vmalloc.h>
 #include <linux/pagemap.h>
@@ -81,7 +80,7 @@
 
 #define DECL_MMSPACE           mm_segment_t __oldfs
 #define MMSPACE_OPEN \
-       do { __oldfs = get_fs(); set_fs(get_ds());} while(0)
+       do { __oldfs = get_fs(); set_fs(get_ds()); } while (0)
 #define MMSPACE_CLOSE         set_fs(__oldfs)
 
 #endif /* __LINUX_CFS_MEM_H__ */
index 261ab80b712cab36f583105c03a20846997437b7..b24bc6b18839a4a38b58728a150fe7cad7324a24 100644 (file)
@@ -45,7 +45,6 @@
 #error Do not #include this file directly. #include <linux/libcfs/libcfs.h> instead
 #endif
 
-
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/proc_fs.h>
index 7a8d006903b907d3cfaba3575b56c93034e62a1b..f95e60ef7b54db98dd34347c94026337ea792269 100644 (file)
@@ -45,7 +45,6 @@
 #error Do not #include this file directly. #include <linux/libcfs/libcfs.h> instead
 #endif
 
-
 #include <net/sock.h>
 
 typedef struct socket   socket_t;
index 201932abcd2ba4308f93c986a994611912ce7896..8d78cb38312d37feee7c2229d17457d7c5d24f87 100644 (file)
@@ -45,7 +45,6 @@
 #error Do not #include this file directly. #include <linux/libcfs/libcfs.h> instead
 #endif
 
-
 /* Portable time API */
 
 /*
@@ -88,7 +87,6 @@
 #define ONE_BILLION ((u_int64_t)1000000000)
 #define ONE_MILLION 1000000
 
-
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/time.h>
@@ -123,7 +121,6 @@ static inline unsigned long long __cfs_fs_time_flat(cfs_fs_time_t *t)
        return (unsigned long long)t->tv_sec * ONE_BILLION + t->tv_nsec;
 }
 
-
 /*
  * Generic kernel stuff
  */
@@ -179,6 +176,7 @@ static inline cfs_duration_t cfs_duration_build(int64_t nano)
        /* We cannot use do_div(t, ONE_BILLION), do_div can only process
         * 64 bits n and 32 bits base */
        int64_t  t = nano * HZ;
+
        do_div(t, 1000);
        do_div(t, 1000000);
        return (cfs_duration_t)t;
@@ -252,7 +250,6 @@ static inline int cfs_time_beforeq_64(__u64 t1, __u64 t2)
        return (__s64)t2 - (__s64)t1 >= 0;
 }
 
-
 /*
  * One jiffy
  */
@@ -261,7 +258,6 @@ static inline int cfs_time_beforeq_64(__u64 t1, __u64 t2)
 #define CFS_TIME_T           "%lu"
 #define CFS_DURATION_T   "%ld"
 
-
 #endif /* __LIBCFS_LINUX_LINUX_TIME_H__ */
 /*
  * Local variables:
index fe4c63fb40a4fb5a70c2cf009d1ae800860d7a89..c6fa7ca4c87b6304c8e9595039cf9bc71d7c4725 100644 (file)
 #ifndef __LIBCFS_LINUX_PORTALS_COMPAT_H__
 #define __LIBCFS_LINUX_PORTALS_COMPAT_H__
 
-// XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved
+/* XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved */
 #if defined(SPINLOCK_DEBUG) && SPINLOCK_DEBUG
 #  define SIGNAL_MASK_ASSERT() \
    LASSERT(current->sighand->siglock.magic == SPINLOCK_MAGIC)
 #else
 # define SIGNAL_MASK_ASSERT()
 #endif
-// XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved
+/* XXX BUG 1511 -- remove this stanza and all callers when bug 1511 is resolved */
 
 #define SIGNAL_MASK_LOCK(task, flags)                            \
        spin_lock_irqsave(&task->sighand->siglock, flags)
index b5b3c23bf85eaef05dceea03f29e04dd7adee688..3350dcc0ca2a0de0862ee6f5fc7eabf178781d49 100644 (file)
@@ -104,17 +104,17 @@ struct upcall_cache;
 struct upcall_cache_ops {
        void        (*init_entry)(struct upcall_cache_entry *, void *args);
        void        (*free_entry)(struct upcall_cache *,
-                                     struct upcall_cache_entry *);
+                                 struct upcall_cache_entry *);
        int          (*upcall_compare)(struct upcall_cache *,
-                                         struct upcall_cache_entry *,
+                                      struct upcall_cache_entry *,
                                          __u64 key, void *args);
        int          (*downcall_compare)(struct upcall_cache *,
-                                           struct upcall_cache_entry *,
+                                        struct upcall_cache_entry *,
                                            __u64 key, void *args);
        int          (*do_upcall)(struct upcall_cache *,
-                                    struct upcall_cache_entry *);
+                                 struct upcall_cache_entry *);
        int          (*parse_downcall)(struct upcall_cache *,
-                                         struct upcall_cache_entry *, void *);
+                                      struct upcall_cache_entry *, void *);
 };
 
 struct upcall_cache {
index 170d6658299c81a8ddb70a67d49dfcc27013463a..7c8d7c7d391c4611dac5a831492f841d8920926d 100644 (file)
@@ -108,21 +108,21 @@ typedef struct cfs_seq_file {
 } cfs_seq_file_t;
 
 typedef struct cfs_seq_operations {
-       void *(*start) (cfs_seq_file_t *m, loff_t *pos);
-       void  (*stop) (cfs_seq_file_t *m, void *v);
-       void *(*next) (cfs_seq_file_t *m, void *v, loff_t *pos);
-       int   (*show) (cfs_seq_file_t *m, void *v);
+       void *(*start)(cfs_seq_file_t *m, loff_t *pos);
+       void  (*stop)(cfs_seq_file_t *m, void *v);
+       void *(*next)(cfs_seq_file_t *m, void *v, loff_t *pos);
+       int   (*show)(cfs_seq_file_t *m, void *v);
 } cfs_seq_ops_t;
 
 typedef void *cfs_poll_table_t;
 
 typedef struct cfs_param_file_ops {
        struct module *owner;
-       int (*open) (cfs_inode_t *, struct file *);
+       int (*open)(cfs_inode_t *, struct file *);
        loff_t (*llseek)(struct file *, loff_t, int);
-       int (*release) (cfs_inode_t *, cfs_param_file_t *);
-       unsigned int (*poll) (struct file *, cfs_poll_table_t *);
-       ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
+       int (*release)(cfs_inode_t *, cfs_param_file_t *);
+       unsigned int (*poll)(struct file *, cfs_poll_table_t *);
+       ssize_t (*write)(struct file *, const char *, size_t, loff_t *);
        ssize_t (*read)(struct file *, char *, size_t, loff_t *);
 } cfs_param_file_ops_t;
 typedef cfs_param_file_ops_t *cfs_lproc_filep_t;
@@ -140,7 +140,7 @@ static inline cfs_proc_inode_t *FAKE_PROC_I(const cfs_inode_t *inode)
 #define cfs_seq_read_common                 NULL
 #define cfs_seq_lseek_common               NULL
 #define cfs_seq_private(seq)               (seq->private)
-#define cfs_seq_read(file, buf, count, ppos, rc) do {} while(0)
+#define cfs_seq_read(file, buf, count, ppos, rc) do {} while (0)
 #define cfs_seq_open(file, ops, rc)                 \
 do {                                               \
         cfs_seq_file_t *p = cfs_file_private(file);    \
@@ -155,7 +155,7 @@ do {                                                    \
        memset(p, 0, sizeof(*p));                      \
        p->op = ops;                                \
        rc = 0;                                  \
-} while(0)
+} while (0)
 
 #endif /* LPROCFS */