drivers: staging: lustre: Fix space required before the open parenthesis '(' errors
authorGreg Donald <gdonald@gmail.com>
Thu, 21 Aug 2014 17:40:35 +0000 (12:40 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Aug 2014 18:59:52 +0000 (11:59 -0700)
Fix checkpatch.pl space required before the open parenthesis '(' errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
26 files changed:
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
drivers/staging/lustre/lnet/selftest/framework.c
drivers/staging/lustre/lustre/include/linux/lvfs.h
drivers/staging/lustre/lustre/include/lprocfs_status.h
drivers/staging/lustre/lustre/include/lustre_dlm.h
drivers/staging/lustre/lustre/include/lustre_export.h
drivers/staging/lustre/lustre/include/lustre_net.h
drivers/staging/lustre/lustre/include/obd.h
drivers/staging/lustre/lustre/include/obd_class.h
drivers/staging/lustre/lustre/include/obd_support.h
drivers/staging/lustre/lustre/llite/dir.c
drivers/staging/lustre/lustre/llite/file.c
drivers/staging/lustre/lustre/llite/llite_lib.c
drivers/staging/lustre/lustre/llite/llite_mmap.c
drivers/staging/lustre/lustre/llite/lproc_llite.c
drivers/staging/lustre/lustre/llite/vvp_dev.c
drivers/staging/lustre/lustre/llite/vvp_io.c
drivers/staging/lustre/lustre/obdclass/cl_io.c
drivers/staging/lustre/lustre/obdclass/class_obd.c
drivers/staging/lustre/lustre/obdclass/idmap.c
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
drivers/staging/lustre/lustre/obdclass/obd_config.c
drivers/staging/lustre/lustre/obdclass/obd_mount.c
drivers/staging/lustre/lustre/obdecho/echo_client.c
drivers/staging/lustre/lustre/ptlrpc/sec_config.c

index ab1643943496fce32dfa7ddd266279ffecf8d235..f10650fdabf2c081098fa709d1bd18e31719d171 100644 (file)
@@ -1025,7 +1025,7 @@ kiblnd_ctl(lnet_ni_t *ni, unsigned int cmd, void *arg)
        struct libcfs_ioctl_data *data = arg;
        int                    rc = -EINVAL;
 
-       switch(cmd) {
+       switch (cmd) {
        case IOC_LIBCFS_GET_PEER: {
                lnet_nid_t   nid = 0;
                int       count = 0;
index c49b01e3489a6a2c625a0928e8306f2a9562288c..e98863134164c8922ef69ccb41c53d4ca927c565 100644 (file)
@@ -232,7 +232,7 @@ ksocknal_transmit (ksock_conn_t *conn, ksock_tx_t *tx)
                                rc = -EAGAIN;
 
                        /* Check if EAGAIN is due to memory pressure */
-                       if(rc == -EAGAIN && ksocknal_lib_memory_pressure(conn))
+                       if (rc == -EAGAIN && ksocknal_lib_memory_pressure(conn))
                                rc = -ENOMEM;
 
                        break;
index 7e83dff2fcb49f86a4b0ff0b6c14ed7bd2bd2768..d01689ac28acd00accdae4d742090be9260d0928 100644 (file)
@@ -1286,7 +1286,7 @@ sfw_handle_server_rpc(struct srpc_server_rpc *rpc)
                goto out;
        }
 
-       switch(sv->sv_id) {
+       switch (sv->sv_id) {
        default:
                LBUG ();
        case SRPC_SERVICE_TEST:
index dd1be9c3982904dd46d5887d366b27f1f78d2dcb..c446375314a849ec88a2c035ca8c6ce93eea5f98 100644 (file)
@@ -87,7 +87,7 @@ struct lvfs_run_ctxt {
 #ifdef OBD_CTXT_DEBUG
 #define OBD_SET_CTXT_MAGIC(ctxt) (ctxt)->magic = OBD_RUN_CTXT_MAGIC
 #else
-#define OBD_SET_CTXT_MAGIC(ctxt) do {} while(0)
+#define OBD_SET_CTXT_MAGIC(ctxt) do {} while (0)
 #endif
 
 
index 16b3d6887ff6517f8309e822306717e3206e09f3..a8b68c175f0cda069bafdf154de9b64911ac4704 100644 (file)
@@ -673,7 +673,7 @@ extern int lprocfs_seq_release(struct inode *, struct file *);
             up_read(&(obd)->u.cli.cl_sem); \
             return -ENODEV;                \
        }                                      \
-} while(0)
+} while (0)
 #define LPROCFS_CLIMP_EXIT(obd)                 \
        up_read(&(obd)->u.cli.cl_sem);
 
index 30b1812f4bf6e167bbacde9199e9061a2c8f8d6d..d6e28e57a7aa24fc008901f712142c05743426e8 100644 (file)
@@ -1072,7 +1072,7 @@ extern char *ldlm_it2str(int it);
            ((libcfs_debug & (mask)) != 0 &&                        \
             (libcfs_subsystem_debug & DEBUG_SUBSYSTEM) != 0))    \
                _ldlm_lock_debug(lock, msgdata, fmt, ##a);            \
-} while(0)
+} while (0)
 
 void _ldlm_lock_debug(struct ldlm_lock *lock,
                      struct libcfs_debug_msg_data *data,
index e5f8e86cd88718695a5ad40dd09a3f4fa27b6ea9..9c06a49f12a4f863444d69919c5deebf9f2f82c2 100644 (file)
@@ -125,14 +125,14 @@ struct nid_stat {
 #define nidstat_getref(nidstat)                                                \
 do {                                                                      \
        atomic_inc(&(nidstat)->nid_exp_ref_count);                       \
-} while(0)
+} while (0)
 
 #define nidstat_putref(nidstat)                                                \
 do {                                                                      \
        atomic_dec(&(nidstat)->nid_exp_ref_count);                       \
        LASSERTF(atomic_read(&(nidstat)->nid_exp_ref_count) >= 0,         \
                 "stat %p nid_exp_ref_count < 0\n", nidstat);             \
-} while(0)
+} while (0)
 
 enum obd_option {
        OBD_OPT_FORCE =  0x0001,
index 7d5442606fce2e7b65cb3abe5ca312307d7d3854..3ff766e08506d9aaf7a75ca44f6da21fcf241ebd 100644 (file)
@@ -1966,7 +1966,7 @@ do {                                                                        \
            ((libcfs_debug & (mask)) != 0 &&                              \
             (libcfs_subsystem_debug & DEBUG_SUBSYSTEM) != 0))          \
                _debug_req((req), msgdata, fmt, ##a);                    \
-} while(0)
+} while (0)
 
 /**
  * This is the debug print function you need to use to print request structure
index 808cb0e040372b281b33a3a18798bcf67d52d71b..0c2a9f16f38a6b13a8b76cce282bd8e504ef1c1b 100644 (file)
@@ -1456,7 +1456,7 @@ extern const struct lsm_operations lsm_v1_ops;
 extern const struct lsm_operations lsm_v3_ops;
 static inline const struct lsm_operations *lsm_op_find(int magic)
 {
-       switch(magic) {
+       switch (magic) {
        case LOV_MAGIC_V1:
               return &lsm_v1_ops;
        case LOV_MAGIC_V3:
index 2348b015b960e14f978d300b5ed5ca76b042d490..a1ce07e24b78fac5959ee74fb696d7bf13d0d02b 100644 (file)
@@ -219,8 +219,8 @@ extern void (*class_export_dump_hook)(struct obd_export *);
 
 #else
 
-#define __class_export_add_lock_ref(exp, lock)      do {} while(0)
-#define __class_export_del_lock_ref(exp, lock)      do {} while(0)
+#define __class_export_add_lock_ref(exp, lock)      do {} while (0)
+#define __class_export_del_lock_ref(exp, lock)      do {} while (0)
 
 #endif
 
@@ -2124,12 +2124,12 @@ extern struct kmem_cache *obdo_cachep;
 #define OBDO_ALLOC(ptr)                                                       \
 do {                                                                     \
        OBD_SLAB_ALLOC_PTR_GFP((ptr), obdo_cachep, GFP_NOFS);             \
-} while(0)
+} while (0)
 
 #define OBDO_FREE(ptr)                                                 \
 do {                                                                     \
        OBD_SLAB_FREE_PTR((ptr), obdo_cachep);                          \
-} while(0)
+} while (0)
 
 
 static inline void obdo2fid(struct obdo *oa, struct lu_fid *fid)
index 874606a45cc15f34bc2299bd56583ed53cfbc77b..62c0ecf613889329c5702d366f4113e758410a27 100644 (file)
@@ -668,7 +668,7 @@ do {                                                                              \
        } else {                                                              \
                OBD_ALLOC_POST(ptr, size, "vmalloced");                \
        }                                                                    \
-} while(0)
+} while (0)
 
 # define OBD_VMALLOC(ptr, size)                                                      \
         __OBD_VMALLOC_VEROBSE(ptr, NULL, 0, size)
@@ -730,7 +730,7 @@ do {                                                                          \
        OBD_FREE_PRE(ptr, size, "kfreed");                                  \
        kfree(ptr);                                                     \
        POISON_PTR(ptr);                                                      \
-} while(0)
+} while (0)
 
 
 #define OBD_FREE_RCU(ptr, size, handle)                                              \
@@ -742,7 +742,7 @@ do {                                                                              \
        __h->h_size = (size);                                                 \
        call_rcu(&__h->h_rcu, class_handle_free_cb);                          \
        POISON_PTR(ptr);                                                      \
-} while(0)
+} while (0)
 
 
 #define OBD_VFREE(ptr, size)                           \
@@ -776,7 +776,7 @@ do {                                                                              \
                    OBD_SLAB_FREE_RTN0(ptr, slab)))) {                  \
                OBD_ALLOC_POST(ptr, size, "slab-alloced");                  \
        }                                                                    \
-} while(0)
+} while (0)
 
 #define OBD_SLAB_ALLOC_GFP(ptr, slab, size, flags)                           \
        __OBD_SLAB_ALLOC_VERBOSE(ptr, slab, NULL, 0, size, flags)
@@ -790,7 +790,7 @@ do {                                                                          \
        OBD_FREE_PRE(ptr, size, "slab-freed");                          \
        kmem_cache_free(slab, ptr);                                     \
        POISON_PTR(ptr);                                                      \
-} while(0)
+} while (0)
 
 #define OBD_SLAB_ALLOC(ptr, slab, size)                                              \
        OBD_SLAB_ALLOC_GFP(ptr, slab, size, GFP_NOFS)
index de5892c5e7d62c21f542a7c4c238aa1b0cdc1b07..701c373670aba4a653e1fe8531af0225c39ad4c8 100644 (file)
@@ -1244,7 +1244,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                return -ENOTTY;
 
        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_IOCTL, 1);
-       switch(cmd) {
+       switch (cmd) {
        case FSFILT_IOC_GETFLAGS:
        case FSFILT_IOC_SETFLAGS:
                return ll_iocontrol(inode, file, cmd, arg);
index 6ffbe7cbe89523b50fe408b1f3977fda465a6475..06aae704a75f4c2e432f5f3d3f435e74138bbe79 100644 (file)
@@ -2149,7 +2149,7 @@ ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        if (_IOC_TYPE(cmd) == 'T' || _IOC_TYPE(cmd) == 't') /* tty ioctls */
                return -ENOTTY;
 
-       switch(cmd) {
+       switch (cmd) {
        case LL_IOC_GETFLAGS:
                /* Get the current value of the file flags */
                return put_user(fd->fd_flags, (int *)arg);
index bc0358dae13265bf516a2ed83f2f0a2d73936a49..f2af3cc54d038a3780a0349cd85dfd804a96d254 100644 (file)
@@ -1885,7 +1885,7 @@ int ll_iocontrol(struct inode *inode, struct file *file,
        struct ptlrpc_request *req = NULL;
        int rc, flags = 0;
 
-       switch(cmd) {
+       switch (cmd) {
        case FSFILT_IOC_GETFLAGS: {
                struct mdt_body *body;
                struct md_op_data *op_data;
index 5002488cebd94b3064377ba32dde8dea474ebb28..45f8516e993996a3aa2d92aef0d056d37a133253 100644 (file)
@@ -71,7 +71,7 @@ struct vm_area_struct *our_vma(struct mm_struct *mm, unsigned long addr,
        /* mmap_sem must have been held by caller. */
        LASSERT(!down_write_trylock(&mm->mmap_sem));
 
-       for(vma = find_vma(mm, addr);
+       for (vma = find_vma(mm, addr);
            vma != NULL && vma->vm_start < (addr + count); vma = vma->vm_next) {
                if (vma->vm_ops && vma->vm_ops == &ll_file_vm_ops &&
                    vma->vm_flags & VM_SHARED) {
@@ -261,7 +261,7 @@ out:
 
 static inline int to_fault_error(int result)
 {
-       switch(result) {
+       switch (result) {
        case 0:
                result = VM_FAULT_LOCKED;
                break;
@@ -399,7 +399,7 @@ static int ll_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
                }
        } while (retry);
 
-       switch(result) {
+       switch (result) {
        case 0:
                LASSERT(PageLocked(vmf->page));
                result = VM_FAULT_LOCKED;
index 77f68b507feaf9ec2ef7cef055c58ee3fe61c763..f493654a92b875c40bdfc179765a36186d506d68 100644 (file)
@@ -1113,12 +1113,12 @@ static void ll_display_extents_info(struct ll_rw_extents_info *io_extents,
        write_cum = 0;
        start = 0;
 
-       for(i = 0; i < LL_HIST_MAX; i++) {
+       for (i = 0; i < LL_HIST_MAX; i++) {
                read_tot += pp_info->pp_r_hist.oh_buckets[i];
                write_tot += pp_info->pp_w_hist.oh_buckets[i];
        }
 
-       for(i = 0; i < LL_HIST_MAX; i++) {
+       for (i = 0; i < LL_HIST_MAX; i++) {
                r = pp_info->pp_r_hist.oh_buckets[i];
                w = pp_info->pp_w_hist.oh_buckets[i];
                read_cum += r;
@@ -1305,15 +1305,15 @@ void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid,
        int *process_count = &sbi->ll_offset_process_count;
        struct ll_rw_extents_info *io_extents = &sbi->ll_rw_extents_info;
 
-       if(!sbi->ll_rw_stats_on)
+       if (!sbi->ll_rw_stats_on)
                return;
        process = sbi->ll_rw_process_info;
        offset = sbi->ll_rw_offset_info;
 
        spin_lock(&sbi->ll_pp_extent_lock);
        /* Extent statistics */
-       for(i = 0; i < LL_PROCESS_HIST_MAX; i++) {
-               if(io_extents->pp_extents[i].pid == pid) {
+       for (i = 0; i < LL_PROCESS_HIST_MAX; i++) {
+               if (io_extents->pp_extents[i].pid == pid) {
                        cur = i;
                        break;
                }
@@ -1376,9 +1376,9 @@ void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid,
                                process[i].rw_offset = pos -
                                        process[i].rw_last_file_pos;
                        }
-                       if(process[i].rw_smallest_extent > count)
+                       if (process[i].rw_smallest_extent > count)
                                process[i].rw_smallest_extent = count;
-                       if(process[i].rw_largest_extent < count)
+                       if (process[i].rw_largest_extent < count)
                                process[i].rw_largest_extent = count;
                        process[i].rw_last_file_pos = pos + count;
                        spin_unlock(&sbi->ll_process_lock);
@@ -1421,7 +1421,7 @@ static int ll_rw_offset_stats_seq_show(struct seq_file *seq, void *v)
                   "R/W", "PID", "RANGE START", "RANGE END",
                   "SMALLEST EXTENT", "LARGEST EXTENT", "OFFSET");
        /* We stored the discontiguous offsets here; print them first */
-       for(i = 0; i < LL_OFFSET_HIST_MAX; i++) {
+       for (i = 0; i < LL_OFFSET_HIST_MAX; i++) {
                if (offset[i].rw_pid != 0)
                        seq_printf(seq,
                                   "%3c %10d %14Lu %14Lu %17lu %17lu %14Lu",
@@ -1434,7 +1434,7 @@ static int ll_rw_offset_stats_seq_show(struct seq_file *seq, void *v)
                                   offset[i].rw_offset);
        }
        /* Then print the current offsets for each process */
-       for(i = 0; i < LL_PROCESS_HIST_MAX; i++) {
+       for (i = 0; i < LL_PROCESS_HIST_MAX; i++) {
                if (process[i].rw_pid != 0)
                        seq_printf(seq,
                                   "%3c %10d %14Lu %14Lu %17lu %17lu %14Lu",
index 0f2e79d6b7f88f353a282c2ed0abf23a7c6f5dc2..61ea9344fd456f0a80d073ab702de596c813f89b 100644 (file)
@@ -394,7 +394,7 @@ static loff_t vvp_pgcache_find(const struct lu_env *env,
                seq_printf(seq, "%s"#flag, has_flags ? "|" : "");       \
                has_flags = 1;                                    \
        }                                                              \
-} while(0)
+} while (0)
 
 static void vvp_pgcache_page_show(const struct lu_env *env,
                                  struct seq_file *seq, struct cl_page *page)
index fd248745cbffac33d3e6d256974fc9fadebc0e7a..e7f7b5a6b20d9167728676bb24e2f3885fabb780 100644 (file)
@@ -238,7 +238,7 @@ static int vvp_mmap_locks(const struct lu_env *env,
                addr &= CFS_PAGE_MASK;
 
                down_read(&mm->mmap_sem);
-               while((vma = our_vma(mm, addr, count)) != NULL) {
+               while ((vma = our_vma(mm, addr, count)) != NULL) {
                        struct inode *inode = vma->vm_file->f_dentry->d_inode;
                        int flags = CEF_MUST;
 
index c0e06040b811442768a99976a298a5abc40fe6db..f2383a497cbeae57ec5cffc5752e2c65e4dc5e38 100644 (file)
@@ -126,7 +126,7 @@ void cl_io_fini(const struct lu_env *env, struct cl_io *io)
                info->clt_current_io = NULL;
 
        /* sanity check for layout change */
-       switch(io->ci_type) {
+       switch (io->ci_type) {
        case CIT_READ:
        case CIT_WRITE:
                break;
index 8b19f3caa68ff95e4f68691611ca3f1bfcf19159..0b9fac26fef56da5cfa5f8ae8bb465ee04b74521 100644 (file)
@@ -381,7 +381,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
                GOTO(out, err = -EINVAL);
        }
 
-       switch(cmd) {
+       switch (cmd) {
        case OBD_IOC_NO_TRANSNO: {
                if (!obd->obd_attached) {
                        CERROR("Device %d not attached\n", obd->obd_minor);
index 1190885c06b6ba8bfb2e96fcae1b5e4c48ae1ee3..24eaeb3b88cad250a330d0d2ba9a4a260f494327 100644 (file)
@@ -442,7 +442,7 @@ struct lustre_idmap_table *lustre_idmap_init(void)
        int i, j;
 
        OBD_ALLOC_PTR(t);
-       if(unlikely(t == NULL))
+       if (unlikely(t == NULL))
                return (ERR_PTR(-ENOMEM));
 
        spin_lock_init(&t->lit_lock);
index 8309d4ce6d60fdb19c503d52bf8f9b0cda4520cd..1dbb30947bec8b117bea0b6686fe61c49b1ec53e 100644 (file)
@@ -751,7 +751,7 @@ int lprocfs_rd_import(struct seq_file *m, void *data)
                      ret.lc_sum, header->lc_units);
 
        k = 0;
-       for(j = 0; j < IMP_AT_MAX_PORTALS; j++) {
+       for (j = 0; j < IMP_AT_MAX_PORTALS; j++) {
                if (imp->imp_at.iat_portal[j] == 0)
                        break;
                k = max_t(unsigned int, k,
@@ -883,7 +883,7 @@ int lprocfs_rd_timeouts(struct seq_file *m, void *data)
                       "network", cur, worst, worstt, DHMS_VARS(&ts));
        lprocfs_at_hist_helper(m, &imp->imp_at.iat_net_latency);
 
-       for(i = 0; i < IMP_AT_MAX_PORTALS; i++) {
+       for (i = 0; i < IMP_AT_MAX_PORTALS; i++) {
                if (imp->imp_at.iat_portal[i] == 0)
                        break;
                cur = at_get(&imp->imp_at.iat_service_estimate[i]);
@@ -1741,7 +1741,7 @@ int lprocfs_exp_cleanup(struct obd_export *exp)
 {
        struct nid_stat *stat = exp->exp_nid_stats;
 
-       if(!stat || !exp->exp_obd)
+       if (!stat || !exp->exp_obd)
                return 0;
 
        nidstat_putref(exp->exp_nid_stats);
@@ -1828,7 +1828,7 @@ int lprocfs_write_frac_u64_helper(const char *buffer, unsigned long count,
        }
 
        units = 1;
-       switch(*end) {
+       switch (*end) {
        case 'p': case 'P':
                units <<= 10;
        case 't': case 'T':
index 0d81d3232f314f3b09777c4cfdcfbcbe50359898..3359d33fa1769f3fc5c7ce91fcb2068d13f526bb 100644 (file)
@@ -1087,7 +1087,7 @@ int class_process_config(struct lustre_cfg *lcfg)
        CDEBUG(D_IOCTL, "processing cmd: %x\n", lcfg->lcfg_command);
 
        /* Commands that don't need a device */
-       switch(lcfg->lcfg_command) {
+       switch (lcfg->lcfg_command) {
        case LCFG_ATTACH: {
                err = class_attach(lcfg);
                GOTO(out, err);
@@ -1203,7 +1203,7 @@ int class_process_config(struct lustre_cfg *lcfg)
                GOTO(out, err = -EINVAL);
        }
 
-       switch(lcfg->lcfg_command) {
+       switch (lcfg->lcfg_command) {
        case LCFG_SETUP: {
                err = class_setup(obd, lcfg);
                GOTO(out, err);
index d972f71c9d97aa96e5a484cbc6bb48680ba622fe..560a47d4eda4c1d8bbc0b80142b278751d9eeab1 100644 (file)
@@ -817,7 +817,7 @@ int lustre_check_exclusion(struct super_block *sb, char *svname)
        CDEBUG(D_MOUNT, "Check exclusion %s (%d) in %d of %s\n", svname,
               index, lmd->lmd_exclude_count, lmd->lmd_dev);
 
-       for(i = 0; i < lmd->lmd_exclude_count; i++) {
+       for (i = 0; i < lmd->lmd_exclude_count; i++) {
                if (index == lmd->lmd_exclude[i]) {
                        CWARN("Excluding %s (on exclusion list)\n", svname);
                        return 1;
index 22736698fffffeef21887067f2af1aa2d044980a..3db5d2ba0df05a23be5ab97af0a044d245010f28 100644 (file)
@@ -903,7 +903,7 @@ static struct lu_device *echo_device_alloc(const struct lu_env *env,
        ed->ed_next = next;
        return &cd->cd_lu_dev;
 out:
-       switch(cleanup) {
+       switch (cleanup) {
        case 4: {
                int rc2;
                rc2 = echo_client_cleanup(obd);
@@ -2548,7 +2548,7 @@ static int echo_client_prep_commit(const struct lu_env *env,
 
        off = offset;
 
-       for(; tot_pages; tot_pages -= npages) {
+       for (; tot_pages; tot_pages -= npages) {
                int lpages;
 
                if (tot_pages < npages)
index 8ef666b95a96df11246f56b3ba07048ce3f74193..5a1e3e6b6af5f4b6655fc1ad5a93c09fd78d1504 100644 (file)
@@ -746,7 +746,7 @@ void sptlrpc_conf_log_update_begin(const char *logname)
 
        conf = sptlrpc_conf_get(fsname, 0);
        if (conf) {
-               if(conf->sc_local) {
+               if (conf->sc_local) {
                        LASSERT(conf->sc_updated == 0);
                        sptlrpc_conf_free_rsets(conf);
                }