Commit bdbb0512 authored by Julia Lawall's avatar Julia Lawall Committed by Greg Kroah-Hartman

staging: lustre: adjust spacing within pointer casts

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: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ea2e3182
...@@ -1747,7 +1747,7 @@ ldlm_work_revoke_ast_lock(struct ptlrpc_request_set *rqset, void *opaq) ...@@ -1747,7 +1747,7 @@ ldlm_work_revoke_ast_lock(struct ptlrpc_request_set *rqset, void *opaq)
desc.l_req_mode = LCK_EX; desc.l_req_mode = LCK_EX;
desc.l_granted_mode = 0; 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); LDLM_LOCK_RELEASE(lock);
return rc; return rc;
...@@ -1776,7 +1776,7 @@ int ldlm_work_gl_ast_lock(struct ptlrpc_request_set *rqset, void *opaq) ...@@ -1776,7 +1776,7 @@ int ldlm_work_gl_ast_lock(struct ptlrpc_request_set *rqset, void *opaq)
arg->gl_desc = gl_work->gl_desc; arg->gl_desc = gl_work->gl_desc;
/* invoke the actual glimpse callback */ /* 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; rc = 1;
LDLM_LOCK_RELEASE(lock); LDLM_LOCK_RELEASE(lock);
......
...@@ -1494,7 +1494,7 @@ static int ll_lov_setea(struct inode *inode, struct file *file, ...@@ -1494,7 +1494,7 @@ static int ll_lov_setea(struct inode *inode, struct file *file,
if (lump == NULL) if (lump == NULL)
return -ENOMEM; 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); OBD_FREE_LARGE(lump, lum_size);
return -EFAULT; return -EFAULT;
} }
...@@ -2328,7 +2328,7 @@ ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -2328,7 +2328,7 @@ ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
if (mdtidx < 0) if (mdtidx < 0)
return mdtidx; return mdtidx;
if (put_user((int)mdtidx, (int*)arg)) if (put_user((int)mdtidx, (int *)arg))
return -EFAULT; return -EFAULT;
return 0; return 0;
......
...@@ -2175,7 +2175,7 @@ int ll_obd_statfs(struct inode *inode, void *arg) ...@@ -2175,7 +2175,7 @@ int ll_obd_statfs(struct inode *inode, void *arg)
if (rc) if (rc)
goto out_statfs; goto out_statfs;
data = (void*)buf; data = (void *)buf;
if (!data->ioc_inlbuf1 || !data->ioc_inlbuf2 || if (!data->ioc_inlbuf1 || !data->ioc_inlbuf2 ||
!data->ioc_pbuf1 || !data->ioc_pbuf2) { !data->ioc_pbuf1 || !data->ioc_pbuf2) {
rc = -EINVAL; rc = -EINVAL;
......
...@@ -705,7 +705,7 @@ static enum llioc_iter lloop_ioctl(struct inode *unused, struct file *file, ...@@ -705,7 +705,7 @@ static enum llioc_iter lloop_ioctl(struct inode *unused, struct file *file,
dev = MKDEV(lloop_major, lo->lo_number); dev = MKDEV(lloop_major, lo->lo_number);
/* quit if the used pointer is writable */ /* 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; err = -EFAULT;
goto out; goto out;
} }
......
...@@ -208,7 +208,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg) ...@@ -208,7 +208,7 @@ int class_handle_ioctl(unsigned int cmd, unsigned long arg)
/* only for debugging */ /* only for debugging */
if (cmd == LIBCFS_IOC_DEBUG_MASK) { 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_subsystem_debug = debug_data->subs;
libcfs_debug = debug_data->debug; libcfs_debug = debug_data->debug;
return 0; return 0;
......
...@@ -927,7 +927,7 @@ EXPORT_SYMBOL(lprocfs_rd_num_exports); ...@@ -927,7 +927,7 @@ EXPORT_SYMBOL(lprocfs_rd_num_exports);
int lprocfs_rd_numrefs(struct seq_file *m, void *data) 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); LASSERT(class != NULL);
return seq_printf(m, "%d\n", class->typ_refcnt); return seq_printf(m, "%d\n", class->typ_refcnt);
......
...@@ -1361,7 +1361,7 @@ int class_config_llog_handler(const struct lu_env *env, ...@@ -1361,7 +1361,7 @@ int class_config_llog_handler(const struct lu_env *env,
{ {
struct config_llog_instance *clli = data; struct config_llog_instance *clli = data;
int cfg_len = rec->lrh_len; int cfg_len = rec->lrh_len;
char *cfg_buf = (char*) (rec + 1); char *cfg_buf = (char *) (rec + 1);
int rc = 0; int rc = 0;
//class_config_dump_handler(handle, rec, data); //class_config_dump_handler(handle, rec, data);
......
...@@ -138,7 +138,7 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[], ...@@ -138,7 +138,7 @@ int osc_quota_setdq(struct client_obd *cli, const unsigned int qid[],
static unsigned static unsigned
oqi_hashfn(struct cfs_hash *hs, const void *key, unsigned mask) 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 static int
......
...@@ -173,7 +173,7 @@ conn_keycmp(const void *key, struct hlist_node *hnode) ...@@ -173,7 +173,7 @@ conn_keycmp(const void *key, struct hlist_node *hnode)
const lnet_process_id_t *conn_key; const lnet_process_id_t *conn_key;
LASSERT(key != NULL); 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); conn = hlist_entry(hnode, struct ptlrpc_connection, c_hash);
return conn_key->nid == conn->c_peer.nid && return conn_key->nid == conn->c_peer.nid &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment