Commit 24c198e9 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre: Make alignment match open parenthesis

This patch fixes most of checkpatch occurences of
"CHECK: Alignment should match open parenthesis"
in Lustre code.
Signed-off-by: default avatarEmoly Liu <emoly.liu@intel.com>
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cd94f231
......@@ -139,7 +139,7 @@ void lustre_insert_debugfs(struct ctl_table *table,
const struct lnet_debugfs_symlink_def *symlinks);
int lprocfs_call_handler(void *data, int write, loff_t *ppos,
void __user *buffer, size_t *lenp,
int (*handler)(void *data, int write,
loff_t pos, void __user *buffer, int len));
int (*handler)(void *data, int write, loff_t pos,
void __user *buffer, int len));
#endif /* _LIBCFS_H */
......@@ -43,7 +43,8 @@ static void kiblnd_peer_connect_failed(struct kib_peer *peer, int active, int er
static void kiblnd_init_tx_msg(lnet_ni_t *ni, struct kib_tx *tx,
int type, int body_nob);
static int kiblnd_init_rdma(struct kib_conn *conn, struct kib_tx *tx, int type,
int resid, struct kib_rdma_desc *dstrd, __u64 dstcookie);
int resid, struct kib_rdma_desc *dstrd,
__u64 dstcookie);
static void kiblnd_queue_tx_locked(struct kib_tx *tx, struct kib_conn *conn);
static void kiblnd_queue_tx(struct kib_tx *tx, struct kib_conn *conn);
static void kiblnd_unmap_tx(lnet_ni_t *ni, struct kib_tx *tx);
......
......@@ -200,8 +200,7 @@ ldlm_interval_extent(struct ldlm_interval *node)
LASSERT(!list_empty(&node->li_group));
lock = list_entry(node->li_group.next, struct ldlm_lock,
l_sl_policy);
lock = list_entry(node->li_group.next, struct ldlm_lock, l_sl_policy);
return &lock->l_policy_data.l_extent;
}
......
......@@ -1095,7 +1095,8 @@ int ldlm_init(void)
ldlm_lock_slab = kmem_cache_create("ldlm_locks",
sizeof(struct ldlm_lock), 0,
SLAB_HWCACHE_ALIGN | SLAB_DESTROY_BY_RCU, NULL);
SLAB_HWCACHE_ALIGN |
SLAB_DESTROY_BY_RCU, NULL);
if (!ldlm_lock_slab) {
kmem_cache_destroy(ldlm_resource_slab);
return -ENOMEM;
......
......@@ -1178,8 +1178,7 @@ static enum ldlm_policy_res ldlm_cancel_lrur_policy(struct ldlm_namespace *ns,
slv = ldlm_pool_get_slv(pl);
lvf = ldlm_pool_get_lvf(pl);
la = cfs_duration_sec(cfs_time_sub(cur,
lock->l_last_used));
la = cfs_duration_sec(cfs_time_sub(cur, lock->l_last_used));
lv = lvf * la * unused;
/* Inform pool about current CLV to see it via debugfs. */
......@@ -1608,8 +1607,7 @@ int ldlm_cli_cancel_list(struct list_head *cancels, int count,
*/
while (count > 0) {
LASSERT(!list_empty(cancels));
lock = list_entry(cancels->next, struct ldlm_lock,
l_bl_ast);
lock = list_entry(cancels->next, struct ldlm_lock, l_bl_ast);
LASSERT(lock->l_conn_export);
if (exp_connect_cancelset(lock->l_conn_export)) {
......
......@@ -758,8 +758,7 @@ static void cleanup_resource(struct ldlm_resource *res, struct list_head *q,
*/
lock_res(res);
list_for_each(tmp, q) {
lock = list_entry(tmp, struct ldlm_lock,
l_res_link);
lock = list_entry(tmp, struct ldlm_lock, l_res_link);
if (ldlm_is_cleaned(lock)) {
lock = NULL;
continue;
......
......@@ -648,8 +648,8 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras,
{
unsigned long stride_gap = index - ras->ras_last_readpage - 1;
if (!stride_io_mode(ras) && (stride_gap != 0 ||
ras->ras_consecutive_stride_requests == 0)) {
if ((stride_gap != 0 || ras->ras_consecutive_stride_requests == 0) &&
!stride_io_mode(ras)) {
ras->ras_stride_pages = ras->ras_consecutive_pages;
ras->ras_stride_length = ras->ras_consecutive_pages +
stride_gap;
......
......@@ -918,7 +918,8 @@ static void ll_statahead_one(struct dentry *parent, const char *entry_name,
if (rc) {
rc1 = ll_sa_entry_to_stated(sai, entry,
rc < 0 ? SA_ENTRY_INVA : SA_ENTRY_SUCC);
rc < 0 ? SA_ENTRY_INVA :
SA_ENTRY_SUCC);
if (rc1 == 0 && entry->se_index == sai->sai_index_wait)
wake_up(&sai->sai_waitq);
} else {
......
......@@ -665,7 +665,8 @@ static int mdc_finish_enqueue(struct obd_export *exp,
lvb_len = req_capsule_get_size(pill, &RMF_DLM_LVB, RCL_SERVER);
if (lvb_len > 0) {
lvb_data = req_capsule_server_sized_get(pill,
&RMF_DLM_LVB, lvb_len);
&RMF_DLM_LVB,
lvb_len);
if (!lvb_data)
return -EPROTO;
}
......
......@@ -398,7 +398,8 @@ int ptlrpc_send_reply(struct ptlrpc_request *req, int flags)
lustre_msg_set_status(req->rq_repmsg,
ptlrpc_status_hton(req->rq_status));
lustre_msg_set_opc(req->rq_repmsg,
req->rq_reqmsg ? lustre_msg_get_opc(req->rq_reqmsg) : 0);
req->rq_reqmsg ?
lustre_msg_get_opc(req->rq_reqmsg) : 0);
target_pack_pool_reply(req);
......
......@@ -1203,7 +1203,8 @@ __u32 lustre_msg_calc_cksum(struct lustre_msg *msg)
unsigned int hsize = 4;
cfs_crypto_hash_digest(CFS_HASH_ALG_CRC32, (unsigned char *)pb,
lustre_msg_buflen(msg, MSG_PTLRPC_BODY_OFF),
lustre_msg_buflen(msg,
MSG_PTLRPC_BODY_OFF),
NULL, 0, (unsigned char *)&crc, &hsize);
return crc;
}
......
......@@ -523,7 +523,8 @@ int sptlrpc_get_bulk_checksum(struct ptlrpc_bulk_desc *desc, __u8 alg,
for (i = 0; i < desc->bd_iov_count; i++) {
cfs_crypto_hash_update_page(hdesc, desc->bd_iov[i].bv_page,
desc->bd_iov[i].bv_offset & ~PAGE_MASK,
desc->bd_iov[i].bv_offset &
~PAGE_MASK,
desc->bd_iov[i].bv_len);
}
......
......@@ -249,9 +249,12 @@ int plain_ctx_verify(struct ptlrpc_cli_ctx *ctx, struct ptlrpc_request *req)
unsigned int hsize = 4;
cfs_crypto_hash_digest(CFS_HASH_ALG_CRC32,
lustre_msg_buf(msg, PLAIN_PACK_MSG_OFF, 0),
lustre_msg_buflen(msg, PLAIN_PACK_MSG_OFF),
NULL, 0, (unsigned char *)&cksum, &hsize);
lustre_msg_buf(msg, PLAIN_PACK_MSG_OFF,
0),
lustre_msg_buflen(msg,
PLAIN_PACK_MSG_OFF),
NULL, 0, (unsigned char *)&cksum,
&hsize);
if (cksum != msg->lm_cksum) {
CDEBUG(D_SEC,
"early reply checksum mismatch: %08x != %08x\n",
......@@ -869,9 +872,12 @@ int plain_authorize(struct ptlrpc_request *req)
unsigned int hsize = 4;
cfs_crypto_hash_digest(CFS_HASH_ALG_CRC32,
lustre_msg_buf(msg, PLAIN_PACK_MSG_OFF, 0),
lustre_msg_buflen(msg, PLAIN_PACK_MSG_OFF),
NULL, 0, (unsigned char *)&msg->lm_cksum, &hsize);
lustre_msg_buf(msg, PLAIN_PACK_MSG_OFF,
0),
lustre_msg_buflen(msg,
PLAIN_PACK_MSG_OFF),
NULL, 0, (unsigned char *)&msg->lm_cksum,
&hsize);
req->rq_reply_off = 0;
}
......
......@@ -1992,7 +1992,8 @@ ptlrpc_wait_event(struct ptlrpc_service_part *svcpt,
l_wait_event_exclusive_head(svcpt->scp_waitq,
ptlrpc_thread_stopping(thread) ||
ptlrpc_server_request_incoming(svcpt) ||
ptlrpc_server_request_pending(svcpt, false) ||
ptlrpc_server_request_pending(svcpt,
false) ||
ptlrpc_rqbd_pending(svcpt) ||
ptlrpc_at_check(svcpt), &lwi);
......@@ -2601,7 +2602,8 @@ static void ptlrpc_wait_replies(struct ptlrpc_service_part *svcpt)
NULL, NULL);
rc = l_wait_event(svcpt->scp_waitq,
atomic_read(&svcpt->scp_nreps_difficult) == 0, &lwi);
atomic_read(&svcpt->scp_nreps_difficult) == 0,
&lwi);
if (rc == 0)
break;
CWARN("Unexpectedly long timeout %s %p\n",
......
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