Skip to content

Commit 2df122b

Browse files
jamesasimmonsgregkh
authored andcommitted
staging: lustre: fix aligments in lnet selftest
Some aligment issues were not caught by checkpatch. We address them here. Some of the alignment issues caused greater than 80 character checkpatch issues. Some changes were done to just make the code more readable and to match our production code. Signed-off-by: James Simmons <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent d7fc52b commit 2df122b

File tree

5 files changed

+17
-19
lines changed

5 files changed

+17
-19
lines changed

drivers/staging/lustre/lnet/selftest/conctl.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,8 +278,7 @@ lst_group_update_ioctl(lstio_group_update_args_t *args)
278278
if (!name)
279279
return -ENOMEM;
280280

281-
if (copy_from_user(name,
282-
args->lstio_grp_namep,
281+
if (copy_from_user(name, args->lstio_grp_namep,
283282
args->lstio_grp_nmlen)) {
284283
LIBCFS_FREE(name, args->lstio_grp_nmlen + 1);
285284
return -EFAULT;
@@ -375,8 +374,8 @@ lst_group_list_ioctl(lstio_group_list_args_t *args)
375374
return -EINVAL;
376375

377376
return lstcon_group_list(args->lstio_grp_idx,
378-
args->lstio_grp_nmlen,
379-
args->lstio_grp_namep);
377+
args->lstio_grp_nmlen,
378+
args->lstio_grp_namep);
380379
}
381380

382381
static int
@@ -743,7 +742,8 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
743742
/* have parameter, check if parameter length is valid */
744743
if (args->lstio_tes_param &&
745744
(args->lstio_tes_param_len <= 0 ||
746-
args->lstio_tes_param_len > PAGE_CACHE_SIZE - sizeof(lstcon_test_t)))
745+
args->lstio_tes_param_len >
746+
PAGE_CACHE_SIZE - sizeof(lstcon_test_t)))
747747
return -EINVAL;
748748

749749
LIBCFS_ALLOC(batch_name, args->lstio_tes_bat_nmlen + 1);

drivers/staging/lustre/lnet/selftest/conrpc.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ lstcon_rpc_trans_name(int transop)
235235
}
236236

237237
int
238-
lstcon_rpc_trans_prep(struct list_head *translist,
239-
int transop, lstcon_rpc_trans_t **transpp)
238+
lstcon_rpc_trans_prep(struct list_head *translist, int transop,
239+
lstcon_rpc_trans_t **transpp)
240240
{
241241
lstcon_rpc_trans_t *trans;
242242

@@ -547,8 +547,7 @@ lstcon_rpc_trans_destroy(lstcon_rpc_trans_t *trans)
547547
lstcon_rpc_t *tmp;
548548
int count = 0;
549549

550-
list_for_each_entry_safe(crpc, tmp, &trans->tas_rpcs_list,
551-
crp_link) {
550+
list_for_each_entry_safe(crpc, tmp, &trans->tas_rpcs_list, crp_link) {
552551
rpc = crpc->crp_rpc;
553552

554553
spin_lock(&rpc->crpc_lock);
@@ -668,8 +667,8 @@ lstcon_batrpc_prep(lstcon_node_t *nd, int transop, unsigned feats,
668667
brq->bar_bid = tsb->tsb_id;
669668
brq->bar_testidx = tsb->tsb_index;
670669
brq->bar_opc = transop == LST_TRANS_TSBRUN ? SRPC_BATCH_OPC_RUN :
671-
(transop == LST_TRANS_TSBSTOP ? SRPC_BATCH_OPC_STOP :
672-
SRPC_BATCH_OPC_QUERY);
670+
(transop == LST_TRANS_TSBSTOP ? SRPC_BATCH_OPC_STOP :
671+
SRPC_BATCH_OPC_QUERY);
673672

674673
if (transop != LST_TRANS_TSBRUN &&
675674
transop != LST_TRANS_TSBSTOP)

drivers/staging/lustre/lnet/selftest/console.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ lstcon_node_find(lnet_process_id_t id, lstcon_node_t **ndpp, int create)
7676

7777
LASSERT(id.nid != LNET_NID_ANY);
7878

79-
list_for_each_entry(ndl, &console_session.ses_ndl_hash[idx], ndl_hlink) {
79+
list_for_each_entry(ndl, &console_session.ses_ndl_hash[idx],
80+
ndl_hlink) {
8081
if (ndl->ndl_node->nd_id.nid != id.nid ||
8182
ndl->ndl_node->nd_id.pid != id.pid)
8283
continue;
@@ -316,7 +317,7 @@ lstcon_group_ndlink_move(lstcon_group_t *old,
316317
lstcon_group_t *new, lstcon_ndlink_t *ndl)
317318
{
318319
unsigned int idx = LNET_NIDADDR(ndl->ndl_node->nd_id.nid) %
319-
LST_NODE_HASHSIZE;
320+
LST_NODE_HASHSIZE;
320321

321322
list_del(&ndl->ndl_hlink);
322323
list_del(&ndl->ndl_link);
@@ -918,7 +919,7 @@ lstcon_batch_list(int index, int len, char __user *name_up)
918919
list_for_each_entry(bat, &console_session.ses_bat_list, bat_link) {
919920
if (!index--) {
920921
return copy_to_user(name_up, bat->bat_name, len) ?
921-
-EFAULT : 0;
922+
-EFAULT : 0;
922923
}
923924
}
924925

drivers/staging/lustre/lnet/selftest/framework.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ sfw_make_session(srpc_mksn_reqst_t *request, srpc_mksn_reply_t *reply)
406406
{
407407
sfw_session_t *sn = sfw_data.fw_session;
408408
srpc_msg_t *msg = container_of(request, srpc_msg_t,
409-
msg_body.mksn_reqst);
409+
msg_body.mksn_reqst);
410410
int cplen = 0;
411411

412412
if (request->mksn_sid.ses_nid == LNET_NID_ANY) {
@@ -1017,8 +1017,7 @@ sfw_run_batch(sfw_batch_t *tsb)
10171017
tsu->tsu_loop = tsi->tsi_loop;
10181018
wi = &tsu->tsu_worker;
10191019
swi_init_workitem(wi, tsu, sfw_run_test,
1020-
lst_sched_test[\
1021-
lnet_cpt_of_nid(tsu->tsu_dest.nid)]);
1020+
lst_sched_test[lnet_cpt_of_nid(tsu->tsu_dest.nid)]);
10221021
swi_schedule_workitem(wi);
10231022
}
10241023
}

drivers/staging/lustre/lnet/selftest/module.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ lnet_selftest_init(void)
116116
rc = cfs_wi_sched_create("lst_t", lnet_cpt_table(), i,
117117
nthrs, &lst_sched_test[i]);
118118
if (rc) {
119-
CERROR("Failed to create CPT affinity WI scheduler %d for LST\n",
120-
i);
119+
CERROR("Failed to create CPT affinity WI scheduler %d for LST\n", i);
121120
goto error;
122121
}
123122
}

0 commit comments

Comments
 (0)