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

Commit b0aa6886 authored by Thibaut Robert's avatar Thibaut Robert Committed by Greg Kroah-Hartman
Browse files

staging: lustre: remove unnecessary braces



This patch fixes checkpatch warnings: "WARNING: braces {} are not
necessary for single statement blocks" and "WARNING: braces {} are not
necessary for any arm of this statement".

Signed-off-by: default avatarThibaut Robert <thibaut.robert@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3f514c35
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -363,17 +363,16 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg)
	 */
	cli->cl_chunkbits = PAGE_SHIFT;

	if (!strcmp(name, LUSTRE_MDC_NAME)) {
	if (!strcmp(name, LUSTRE_MDC_NAME))
		cli->cl_max_rpcs_in_flight = OBD_MAX_RIF_DEFAULT;
	} else if (totalram_pages >> (20 - PAGE_SHIFT) <= 128 /* MB */) {
	else if (totalram_pages >> (20 - PAGE_SHIFT) <= 128 /* MB */)
		cli->cl_max_rpcs_in_flight = 2;
	} else if (totalram_pages >> (20 - PAGE_SHIFT) <= 256 /* MB */) {
	else if (totalram_pages >> (20 - PAGE_SHIFT) <= 256 /* MB */)
		cli->cl_max_rpcs_in_flight = 3;
	} else if (totalram_pages >> (20 - PAGE_SHIFT) <= 512 /* MB */) {
	else if (totalram_pages >> (20 - PAGE_SHIFT) <= 512 /* MB */)
		cli->cl_max_rpcs_in_flight = 4;
	} else {
	else
		cli->cl_max_rpcs_in_flight = OBD_MAX_RIF_DEFAULT;
	}

	spin_lock_init(&cli->cl_mod_rpcs_lock);
	spin_lock_init(&cli->cl_mod_rpcs_hist.oh_lock);
+2 −4
Original line number Diff line number Diff line
@@ -2413,9 +2413,8 @@ static int lmv_read_page(struct obd_export *exp, struct md_op_data *op_data,
	if (rc)
		return rc;

	if (unlikely(lsm)) {
	if (unlikely(lsm))
		return lmv_read_striped_page(exp, op_data, cb_op, offset, ppage);
	}

	tgt = lmv_find_target(lmv, &op_data->op_fid1);
	if (IS_ERR(tgt))
@@ -3107,9 +3106,8 @@ static int lmv_quotactl(struct obd_device *unused, struct obd_export *exp,
		return -EIO;
	}

	if (oqctl->qc_cmd != Q_GETOQUOTA) {
	if (oqctl->qc_cmd != Q_GETOQUOTA)
		return obd_quotactl(tgt->ltd_exp, oqctl);
	}

	for (i = 0; i < lmv->desc.ld_tgt_count; i++) {
		int err;
+4 −4
Original line number Diff line number Diff line
@@ -911,13 +911,13 @@ static int mdc_finish_intent_lock(struct obd_export *exp,
		OBD_FAIL_TIMEOUT(OBD_FAIL_MDC_ENQUEUE_PAUSE, obd_timeout);
	}

	if (it->it_op & IT_CREAT) {
	if (it->it_op & IT_CREAT)
		/* XXX this belongs in ll_create_it */
	} else if (it->it_op == IT_OPEN) {
		;
	else if (it->it_op == IT_OPEN)
		LASSERT(!it_disposition(it, DISP_OPEN_CREATE));
	} else {
	else
		LASSERT(it->it_op & (IT_GETATTR | IT_LOOKUP | IT_LAYOUT));
	}

	/* If we already have a matching lock, then cancel the new
	 * one.  We have to set the data here instead of in
+1 −2
Original line number Diff line number Diff line
@@ -918,9 +918,8 @@ static unsigned long lu_htable_order(struct lu_device *top)
	cache_size = cache_size / 100 * lu_cache_percent *
		(PAGE_SIZE / 1024);

	for (bits = 1; (1 << bits) < cache_size; ++bits) {
	for (bits = 1; (1 << bits) < cache_size; ++bits)
		;
	}
	return clamp_t(typeof(bits), bits, LU_SITE_BITS_MIN, bits_max);
}

+1 −2
Original line number Diff line number Diff line
@@ -1646,9 +1646,8 @@ static int echo_client_connect(const struct lu_env *env,
	struct lustre_handle conn = { 0 };

	rc = class_connect(&conn, src, cluuid);
	if (rc == 0) {
	if (rc == 0)
		*exp = class_conn2export(&conn);
	}

	return rc;
}
Loading