Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2df122bd authored by James Simmons's avatar James Simmons Committed by Greg Kroah-Hartman
Browse files

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: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d7fc52bd
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -278,8 +278,7 @@ lst_group_update_ioctl(lstio_group_update_args_t *args)
	if (!name)
		return -ENOMEM;

	if (copy_from_user(name,
			   args->lstio_grp_namep,
	if (copy_from_user(name, args->lstio_grp_namep,
			   args->lstio_grp_nmlen)) {
		LIBCFS_FREE(name, args->lstio_grp_nmlen + 1);
		return -EFAULT;
@@ -743,7 +742,8 @@ static int lst_test_add_ioctl(lstio_test_args_t *args)
	/* have parameter, check if parameter length is valid */
	if (args->lstio_tes_param &&
	    (args->lstio_tes_param_len <= 0 ||
	     args->lstio_tes_param_len > PAGE_CACHE_SIZE - sizeof(lstcon_test_t)))
	     args->lstio_tes_param_len >
	     PAGE_CACHE_SIZE - sizeof(lstcon_test_t)))
		return -EINVAL;

	LIBCFS_ALLOC(batch_name, args->lstio_tes_bat_nmlen + 1);
+5 −6
Original line number Diff line number Diff line
@@ -235,8 +235,8 @@ lstcon_rpc_trans_name(int transop)
}

int
lstcon_rpc_trans_prep(struct list_head *translist,
		      int transop, lstcon_rpc_trans_t **transpp)
lstcon_rpc_trans_prep(struct list_head *translist, int transop,
		      lstcon_rpc_trans_t **transpp)
{
	lstcon_rpc_trans_t *trans;

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

	list_for_each_entry_safe(crpc, tmp, &trans->tas_rpcs_list,
				 crp_link) {
	list_for_each_entry_safe(crpc, tmp, &trans->tas_rpcs_list, crp_link) {
		rpc = crpc->crp_rpc;

		spin_lock(&rpc->crpc_lock);
+4 −3
Original line number Diff line number Diff line
@@ -76,7 +76,8 @@ lstcon_node_find(lnet_process_id_t id, lstcon_node_t **ndpp, int create)

	LASSERT(id.nid != LNET_NID_ANY);

	list_for_each_entry(ndl, &console_session.ses_ndl_hash[idx], ndl_hlink) {
	list_for_each_entry(ndl, &console_session.ses_ndl_hash[idx],
			    ndl_hlink) {
		if (ndl->ndl_node->nd_id.nid != id.nid ||
		    ndl->ndl_node->nd_id.pid != id.pid)
			continue;
+2 −3
Original line number Diff line number Diff line
@@ -1017,8 +1017,7 @@ sfw_run_batch(sfw_batch_t *tsb)
			tsu->tsu_loop = tsi->tsi_loop;
			wi = &tsu->tsu_worker;
			swi_init_workitem(wi, tsu, sfw_run_test,
					  lst_sched_test[\
					  lnet_cpt_of_nid(tsu->tsu_dest.nid)]);
					  lst_sched_test[lnet_cpt_of_nid(tsu->tsu_dest.nid)]);
			swi_schedule_workitem(wi);
		}
	}
+1 −2
Original line number Diff line number Diff line
@@ -116,8 +116,7 @@ lnet_selftest_init(void)
		rc = cfs_wi_sched_create("lst_t", lnet_cpt_table(), i,
					 nthrs, &lst_sched_test[i]);
		if (rc) {
			CERROR("Failed to create CPT affinity WI scheduler %d for LST\n",
			       i);
			CERROR("Failed to create CPT affinity WI scheduler %d for LST\n", i);
			goto error;
		}
	}