staging: lustre: adjust spacing within pointer casts
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 30 Aug 2014 20:11:37 +0000 (22:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 30 Aug 2014 20:17:51 +0000 (13:17 -0700)
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
type T;
expression e;
@@
 (
- T *
+ T *
 )
 e
// </smpl>

This semantic patch just removes the cast and adds it back, but when it
does so, it follows the spacing conventions of Linux.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
drivers/staging/lustre/lustre/llite/file.c
drivers/staging/lustre/lustre/llite/llite_lib.c
drivers/staging/lustre/lustre/llite/lloop.c
drivers/staging/lustre/lustre/obdclass/class_obd.c
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
drivers/staging/lustre/lustre/obdclass/obd_config.c
drivers/staging/lustre/lustre/osc/osc_quota.c
drivers/staging/lustre/lustre/ptlrpc/connection.c

index 46b8b8c30b7864749eec132060510cc737cae24a..7fa5d435c827fb91c82000c649e60997dc48a14c 100644 (file)
@@ -1747,7 +1747,7 @@ ldlm_work_revoke_ast_lock(struct ptlrpc_request_set *rqset, void *opaq)
        desc.l_req_mode = LCK_EX;
        desc.l_granted_mode = 0;
 
-       rc = lock->l_blocking_ast(lock, &desc, (void*)arg, LDLM_CB_BLOCKING);
+       rc = lock->l_blocking_ast(lock, &desc, (void *)arg, LDLM_CB_BLOCKING);
        LDLM_LOCK_RELEASE(lock);
 
        return rc;
@@ -1776,7 +1776,7 @@ int ldlm_work_gl_ast_lock(struct ptlrpc_request_set *rqset, void *opaq)
        arg->gl_desc = gl_work->gl_desc;
 
        /* invoke the actual glimpse callback */
-       if (lock->l_glimpse_ast(lock, (void*)arg) == 0)
+       if (lock->l_glimpse_ast(lock, (void *)arg) == 0)
                rc = 1;
 
        LDLM_LOCK_RELEASE(lock);
index fb3320dca2e1a9b447f0f06e1f904ac02a649b95..10a1475a9058e40034f9d133b89eafcf5632fd01 100644 (file)
@@ -1494,7 +1494,7 @@ static int ll_lov_setea(struct inode *inode, struct file *file,
        if (lump == NULL)
                return -ENOMEM;
 
-       if (copy_from_user(lump, (struct lov_user_md  *)arg, lum_size)) {
+       if (copy_from_user(lump, (struct lov_user_md *)arg, lum_size)) {
                OBD_FREE_LARGE(lump, lum_size);
                return -EFAULT;
        }
@@ -2328,7 +2328,7 @@ ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                if (mdtidx < 0)
                        return mdtidx;
 
-               if (put_user((int)mdtidx, (int*)arg))
+               if (put_user((int)mdtidx, (int *)arg))
                        return -EFAULT;
 
                return 0;
index 454f0489939391ed1c889e0781c21219a2c4d8b1..097ee1bd810c4fc411130cdc82c295aa57db49a1 100644 (file)
@@ -2175,7 +2175,7 @@ int ll_obd_statfs(struct inode *inode, void *arg)
        if (rc)
                goto out_statfs;
 
-       data = (void*)buf;
+       data = (void *)buf;
        if (!data->ioc_inlbuf1 || !data->ioc_inlbuf2 ||
            !data->ioc_pbuf1 || !data->ioc_pbuf2) {
                rc = -EINVAL;
index 177137af7e97c2ab9344d939e777ae00845bc24d..a5a41156ad72101a4a79d358195e48ddffbc305a 100644 (file)
@@ -705,7 +705,7 @@ static enum llioc_iter lloop_ioctl(struct inode *unused, struct file *file,
                dev = MKDEV(lloop_major, lo->lo_number);
 
                /* quit if the used pointer is writable */
-               if (put_user((long)old_encode_dev(dev), (long*)arg)) {
+               if (put_user((long)old_encode_dev(dev), (long *)arg)) {
                        err = -EFAULT;
                        goto out;
                }
index 0b9fac26fef56da5cfa5f8ae8bb465ee04b74521..377c71368559dcd6ca00d24ab3d0d2fee7e3f99e 100644 (file)
@@ -208,7 +208,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
 
        /* only for debugging */
        if (cmd == LIBCFS_IOC_DEBUG_MASK) {
-               debug_data = (struct libcfs_debug_ioctl_data*)arg;
+               debug_data = (struct libcfs_debug_ioctl_data *)arg;
                libcfs_subsystem_debug = debug_data->subs;
                libcfs_debug = debug_data->debug;
                return 0;
index 36ab97cd2a039269001d4434f5fcb2f3ab103fec..7893c2d0d653ebfa7c9dab61a1632ab414c05638 100644 (file)
@@ -927,7 +927,7 @@ EXPORT_SYMBOL(lprocfs_rd_num_exports);
 
 int lprocfs_rd_numrefs(struct seq_file *m, void *data)
 {
-       struct obd_type *class = (struct obd_type*) data;
+       struct obd_type *class = (struct obd_type *) data;
 
        LASSERT(class != NULL);
        return seq_printf(m, "%d\n", class->typ_refcnt);
index 3359d33fa1769f3fc5c7ce91fcb2068d13f526bb..f41695df4015246e4ec628c199d97a997425e2d1 100644 (file)
@@ -1361,7 +1361,7 @@ int class_config_llog_handler(const struct lu_env *env,
 {
        struct config_llog_instance *clli = data;
        int cfg_len = rec->lrh_len;
-       char *cfg_buf = (char*) (rec + 1);
+       char *cfg_buf = (char *) (rec + 1);
        int rc = 0;
 
        //class_config_dump_handler(handle, rec, data);
index db4540a0a4958772dbf7cc258ef4d6aa7d5460ea..69872615823e1a63f4beb105f69f8b4dac62e773 100644 (file)
@@ -138,7 +138,7 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[],
 static unsigned
 oqi_hashfn(struct cfs_hash *hs, const void *key, unsigned mask)
 {
-       return cfs_hash_u32_hash(*((__u32*)key), mask);
+       return cfs_hash_u32_hash(*((__u32 *)key), mask);
 }
 
 static int
index 62154c45f420af4bd33c5b73130d478b4d7bf377..6f633330fd0c319ac38250de1bea7a75ba0f29c4 100644 (file)
@@ -173,7 +173,7 @@ conn_keycmp(const void *key, struct hlist_node *hnode)
        const lnet_process_id_t *conn_key;
 
        LASSERT(key != NULL);
-       conn_key = (lnet_process_id_t*)key;
+       conn_key = (lnet_process_id_t *)key;
        conn = hlist_entry(hnode, struct ptlrpc_connection, c_hash);
 
        return conn_key->nid == conn->c_peer.nid &&