Commit 30c0aa39 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre/ptlrpc: Fix style vs open parenthesis alignment

This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a742c93b
......@@ -896,8 +896,7 @@ void ptlrpc_set_destroy(struct ptlrpc_request_set *set)
RQ_PHASE_COMPLETE : RQ_PHASE_NEW;
list_for_each(tmp, &set->set_requests) {
struct ptlrpc_request *req =
list_entry(tmp, struct ptlrpc_request,
rq_set_chain);
list_entry(tmp, struct ptlrpc_request, rq_set_chain);
LASSERT(req->rq_phase == expected_phase);
n++;
......@@ -909,8 +908,7 @@ void ptlrpc_set_destroy(struct ptlrpc_request_set *set)
list_for_each_safe(tmp, next, &set->set_requests) {
struct ptlrpc_request *req =
list_entry(tmp, struct ptlrpc_request,
rq_set_chain);
list_entry(tmp, struct ptlrpc_request, rq_set_chain);
list_del_init(&req->rq_set_chain);
LASSERT(req->rq_phase == expected_phase);
......@@ -1475,8 +1473,7 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)
INIT_LIST_HEAD(&comp_reqs);
list_for_each_safe(tmp, next, &set->set_requests) {
struct ptlrpc_request *req =
list_entry(tmp, struct ptlrpc_request,
rq_set_chain);
list_entry(tmp, struct ptlrpc_request, rq_set_chain);
struct obd_import *imp = req->rq_import;
int unregistered = 0;
int rc = 0;
......@@ -1618,8 +1615,7 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)
*/
list_del_init(&req->rq_list);
list_add_tail(&req->rq_list,
&imp->
imp_delayed_list);
&imp->imp_delayed_list);
spin_unlock(&imp->imp_lock);
continue;
}
......@@ -1944,8 +1940,7 @@ int ptlrpc_expired_set(void *data)
/* A timeout expired. See which reqs it applies to... */
list_for_each(tmp, &set->set_requests) {
struct ptlrpc_request *req =
list_entry(tmp, struct ptlrpc_request,
rq_set_chain);
list_entry(tmp, struct ptlrpc_request, rq_set_chain);
/* don't expire request waiting for context */
if (req->rq_wait_ctx)
......@@ -2001,8 +1996,7 @@ void ptlrpc_interrupted_set(void *data)
list_for_each(tmp, &set->set_requests) {
struct ptlrpc_request *req =
list_entry(tmp, struct ptlrpc_request,
rq_set_chain);
list_entry(tmp, struct ptlrpc_request, rq_set_chain);
if (req->rq_phase != RQ_PHASE_RPC &&
req->rq_phase != RQ_PHASE_UNREGISTERING)
......@@ -2568,8 +2562,7 @@ void ptlrpc_retain_replayable_request(struct ptlrpc_request *req,
ptlrpc_request_addref(req);
list_for_each_prev(tmp, &imp->imp_replay_list) {
struct ptlrpc_request *iter =
list_entry(tmp, struct ptlrpc_request,
rq_replay_list);
list_entry(tmp, struct ptlrpc_request, rq_replay_list);
/*
* We may have duplicate transnos if we create and then
......@@ -2842,8 +2835,7 @@ void ptlrpc_abort_set(struct ptlrpc_request_set *set)
list_for_each_safe(pos, tmp, &set->set_requests) {
struct ptlrpc_request *req =
list_entry(pos, struct ptlrpc_request,
rq_set_chain);
list_entry(pos, struct ptlrpc_request, rq_set_chain);
spin_lock(&req->rq_lock);
if (req->rq_phase != RQ_PHASE_RPC) {
......
......@@ -1032,8 +1032,7 @@ static int ptlrpc_connect_interpret(const struct lu_env *env,
spin_lock(&imp->imp_lock);
list_del(&imp->imp_conn_current->oic_item);
list_add(&imp->imp_conn_current->oic_item,
&imp->imp_conn_list);
list_add(&imp->imp_conn_current->oic_item, &imp->imp_conn_list);
imp->imp_last_success_conn =
imp->imp_conn_current->oic_last_attempt;
......
......@@ -1751,8 +1751,7 @@ static int __req_capsule_offset(const struct req_capsule *pill,
int offset;
offset = field->rmf_offset[pill->rc_fmt->rf_idx][loc];
LASSERTF(offset > 0, "%s:%s, off=%d, loc=%d\n",
pill->rc_fmt->rf_name,
LASSERTF(offset > 0, "%s:%s, off=%d, loc=%d\n", pill->rc_fmt->rf_name,
field->rmf_name, offset, loc);
offset--;
......
......@@ -518,8 +518,7 @@ static int ptlrpc_lprocfs_nrs_seq_show(struct seq_file *m, void *n)
pol_idx = 0;
list_for_each_entry(policy, &nrs->nrs_policy_list,
pol_list) {
list_for_each_entry(policy, &nrs->nrs_policy_list, pol_list) {
LASSERT(pol_idx < num_pols);
nrs_policy_get_info_locked(policy, &tmp);
......@@ -981,7 +980,7 @@ static int ptlrpc_lprocfs_timeouts_seq_show(struct seq_file *m, void *n)
s2dhms(&ts, ktime_get_real_seconds() - worstt);
seq_printf(m, "%10s : cur %3u worst %3u (at %lld, "
DHMS_FMT" ago) ", "service",
DHMS_FMT " ago) ", "service",
cur, worst, (s64)worstt, DHMS_VARS(&ts));
lprocfs_at_hist_helper(m, &svcpt->scp_at_estimate);
......
......@@ -978,8 +978,7 @@ static void nrs_svcpt_cleanup_locked(struct ptlrpc_service_part *svcpt)
nrs = nrs_svcpt2nrs(svcpt, hp);
nrs->nrs_stopping = 1;
list_for_each_entry_safe(policy, tmp, &nrs->nrs_policy_list,
pol_list) {
list_for_each_entry_safe(policy, tmp, &nrs->nrs_policy_list, pol_list) {
rc = nrs_policy_unregister(nrs, policy->pol_desc->pd_name);
LASSERT(rc == 0);
}
......@@ -1446,8 +1445,7 @@ ptlrpc_nrs_req_get_nolock0(struct ptlrpc_service_part *svcpt, bool hp,
* Always try to drain requests from all NRS polices even if they are
* inactive, because the user can change policy status at runtime.
*/
list_for_each_entry(policy, &nrs->nrs_policy_queued,
pol_list_queued) {
list_for_each_entry(policy, &nrs->nrs_policy_queued, pol_list_queued) {
nrq = nrs_request_get(policy, peek, force);
if (nrq) {
if (likely(!peek)) {
......@@ -1599,8 +1597,7 @@ void ptlrpc_nrs_fini(void)
struct ptlrpc_nrs_pol_desc *desc;
struct ptlrpc_nrs_pol_desc *tmp;
list_for_each_entry_safe(desc, tmp, &nrs_core.nrs_policies,
pd_list) {
list_for_each_entry_safe(desc, tmp, &nrs_core.nrs_policies, pd_list) {
list_del_init(&desc->pd_list);
kfree(desc);
}
......
......@@ -404,7 +404,8 @@ EXPORT_SYMBOL(ptlrpc_pinger_del_import);
* be called when timeout happens.
*/
static struct timeout_item *ptlrpc_new_timeout(int time,
enum timeout_event event, timeout_cb_t cb, void *data)
enum timeout_event event,
timeout_cb_t cb, void *data)
{
struct timeout_item *ti;
......
......@@ -210,8 +210,7 @@ static int ptlrpcd_steal_rqset(struct ptlrpc_request_set *des,
rq_set_chain);
req->rq_set = des;
}
list_splice_init(&src->set_new_requests,
&des->set_requests);
list_splice_init(&src->set_new_requests, &des->set_requests);
rc = atomic_read(&src->set_new_count);
atomic_add(rc, &des->set_remaining);
atomic_set(&src->set_new_count, 0);
......
......@@ -107,8 +107,7 @@ int ptlrpc_replay_next(struct obd_import *imp, int *inflight)
/* Replay all the committed open requests on committed_list first */
if (!list_empty(&imp->imp_committed_list)) {
tmp = imp->imp_committed_list.prev;
req = list_entry(tmp, struct ptlrpc_request,
rq_replay_list);
req = list_entry(tmp, struct ptlrpc_request, rq_replay_list);
/* The last request on committed_list hasn't been replayed */
if (req->rq_transno > last_transno) {
......@@ -195,8 +194,7 @@ int ptlrpc_resend(struct obd_import *imp)
return -1;
}
list_for_each_entry_safe(req, next, &imp->imp_sending_list,
rq_list) {
list_for_each_entry_safe(req, next, &imp->imp_sending_list, rq_list) {
LASSERTF((long)req > PAGE_CACHE_SIZE && req != LP_POISON,
"req %p bad\n", req);
LASSERTF(req->rq_type != LI_POISON, "req %p freed\n", req);
......
......@@ -808,8 +808,7 @@ static void ptlrpc_server_drop_request(struct ptlrpc_request *req)
*/
LASSERT(atomic_read(&rqbd->rqbd_req.rq_refcount) ==
0);
list_add_tail(&rqbd->rqbd_list,
&svcpt->scp_rqbd_idle);
list_add_tail(&rqbd->rqbd_list, &svcpt->scp_rqbd_idle);
}
spin_unlock(&svcpt->scp_lock);
......@@ -957,8 +956,7 @@ static int ptlrpc_at_add_timed(struct ptlrpc_request *req)
/* latest rpcs will have the latest deadlines in the list,
* so search backward.
*/
list_for_each_entry_reverse(rq,
&array->paa_reqs_array[index],
list_for_each_entry_reverse(rq, &array->paa_reqs_array[index],
rq_timed_list) {
if (req->rq_deadline >= rq->rq_deadline) {
list_add(&req->rq_timed_list,
......@@ -970,8 +968,7 @@ static int ptlrpc_at_add_timed(struct ptlrpc_request *req)
/* Add the request at the head of the list */
if (list_empty(&req->rq_timed_list))
list_add(&req->rq_timed_list,
&array->paa_reqs_array[index]);
list_add(&req->rq_timed_list, &array->paa_reqs_array[index]);
spin_lock(&req->rq_lock);
req->rq_at_linked = 1;
......@@ -1179,8 +1176,7 @@ static void ptlrpc_at_check_timed(struct ptlrpc_service_part *svcpt)
count = array->paa_count;
while (count > 0) {
count -= array->paa_reqs_count[index];
list_for_each_entry_safe(rq, n,
&array->paa_reqs_array[index],
list_for_each_entry_safe(rq, n, &array->paa_reqs_array[index],
rq_timed_list) {
if (rq->rq_deadline > now + at_early_margin) {
/* update the earliest deadline */
......@@ -1278,8 +1274,7 @@ static int ptlrpc_server_hpreq_init(struct ptlrpc_service_part *svcpt,
}
spin_lock_bh(&req->rq_export->exp_rpc_lock);
list_add(&req->rq_exp_list,
&req->rq_export->exp_hp_rpcs);
list_add(&req->rq_exp_list, &req->rq_export->exp_hp_rpcs);
spin_unlock_bh(&req->rq_export->exp_rpc_lock);
}
......@@ -2235,8 +2230,7 @@ static int ptlrpc_hr_main(void *arg)
while (!list_empty(&replies)) {
struct ptlrpc_reply_state *rs;
rs = list_entry(replies.prev,
struct ptlrpc_reply_state,
rs = list_entry(replies.prev, struct ptlrpc_reply_state,
rs_list);
list_del_init(&rs->rs_list);
ptlrpc_handle_rs(rs);
......@@ -2289,8 +2283,7 @@ static int ptlrpc_start_hr_threads(void)
task = kthread_run(ptlrpc_hr_main,
&hrp->hrp_thrs[j],
"ptlrpc_hr%02d_%03d",
hrp->hrp_cpt,
hrt->hrt_id);
hrp->hrp_cpt, hrt->hrt_id);
if (IS_ERR(task)) {
rc = PTR_ERR(task);
break;
......
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