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

Commit b6ee3824 authored by Haneen Mohammed's avatar Haneen Mohammed Committed by Greg Kroah-Hartman
Browse files

Staging: lustre: Remove parentheses around right side an assignment



Parentheses are not needed around the right hand side of an assignment.
This patch remove parenthese of such occurenses. Issue was detected and
solved using the following coccinelle script:

@rule1@
identifier x, y, z;
expression E1, E2;
@@

(
x = (y == z);
|
x = (E1 == E2);
|
 x =
-(
...
-)
 ;
)

Signed-off-by: default avatarHaneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b4e3e6ee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2972,7 +2972,7 @@ kiblnd_start_schedulers(struct kib_sched_info *sched)
	} else {
		LASSERT(sched->ibs_nthreads <= sched->ibs_nthreads_max);
		/* increase one thread if there is new interface */
		nthrs = (sched->ibs_nthreads < sched->ibs_nthreads_max);
		nthrs = sched->ibs_nthreads < sched->ibs_nthreads_max;
	}

	for (i = 0; i < nthrs; i++) {
+2 −2
Original line number Diff line number Diff line
@@ -722,7 +722,7 @@ ksocknal_match_peerip(ksock_interface_t *iface, __u32 *ips, int nips)
		if (ips[i] == 0)
			continue;

		this_xor = (ips[i] ^ iface->ksni_ipaddr);
		this_xor = ips[i] ^ iface->ksni_ipaddr;
		this_netmatch = ((this_xor & iface->ksni_netmask) == 0) ? 1 : 0;

		if (!(best < 0 ||
@@ -809,7 +809,7 @@ ksocknal_select_ips(ksock_peer_t *peer, __u32 *peerips, int n_peerips)
					continue;

				k = ksocknal_match_peerip(iface, peerips, n_peerips);
				xor = (ip ^ peerips[k]);
				xor = ip ^ peerips[k];
				this_netmatch = ((xor & iface->ksni_netmask) == 0) ? 1 : 0;

				if (!(best_iface == NULL ||
+2 −2
Original line number Diff line number Diff line
@@ -1374,9 +1374,9 @@ ksocknal_sched_cansleep(ksock_sched_t *sched)

	spin_lock_bh(&sched->kss_lock);

	rc = (!ksocknal_data.ksnd_shuttingdown &&
	rc = !ksocknal_data.ksnd_shuttingdown &&
	      list_empty(&sched->kss_rx_conns) &&
	      list_empty(&sched->kss_tx_conns));
	      list_empty(&sched->kss_tx_conns);

	spin_unlock_bh(&sched->kss_lock);
	return rc;
+1 −1
Original line number Diff line number Diff line
@@ -152,7 +152,7 @@ void ldlm_handle_bl_callback(struct ldlm_namespace *ns,
	if (lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK)
		lock->l_flags |= LDLM_FL_CANCEL;

	do_ast = (!lock->l_readers && !lock->l_writers);
	do_ast = !lock->l_readers && !lock->l_writers;
	unlock_res_and_lock(lock);

	if (do_ast) {
+1 −1
Original line number Diff line number Diff line
@@ -307,7 +307,7 @@ int ldlm_blocking_ast_nocheck(struct ldlm_lock *lock)
	int do_ast;

	lock->l_flags |= LDLM_FL_CBPENDING;
	do_ast = (!lock->l_readers && !lock->l_writers);
	do_ast = !lock->l_readers && !lock->l_writers;
	unlock_res_and_lock(lock);

	if (do_ast) {
Loading