Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1386336 > unrolled thread

[PATCH 27/30] drbd: get rid of empty statement in is_valid_state

Started byPhilipp Reisner <philipp.reisner@linbit.com>
First post2016-04-25 14:20 +0200
Last post2016-04-25 14:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 27/30] drbd: get rid of empty statement in is_valid_state Philipp Reisner <philipp.reisner@linbit.com> - 2016-04-25 14:20 +0200

#1386336 — [PATCH 27/30] drbd: get rid of empty statement in is_valid_state

FromPhilipp Reisner <philipp.reisner@linbit.com>
Date2016-04-25 14:20 +0200
Subject[PATCH 27/30] drbd: get rid of empty statement in is_valid_state
Message-ID<rrNEC-5K2-29@gated-at.bofh.it>
From: Roland Kammerer <roland.kammerer@linbit.com>

This should silence a warning about an empty statement. Thanks to Fabian
Frederick <fabf@skynet.be> who sent a patch I modified to be smaller and
avoids an additional indent level.

Signed-off-by: Roland Kammerer <roland.kammerer@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
---
 drivers/block/drbd/drbd_state.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c
index aca68a5..eea0c4a 100644
--- a/drivers/block/drbd/drbd_state.c
+++ b/drivers/block/drbd/drbd_state.c
@@ -814,7 +814,7 @@ is_valid_state(struct drbd_device *device, union drbd_state ns)
 	}
 
 	if (rv <= 0)
-		/* already found a reason to abort */;
+		goto out; /* already found a reason to abort */
 	else if (ns.role == R_SECONDARY && device->open_cnt)
 		rv = SS_DEVICE_IN_USE;
 
@@ -862,6 +862,7 @@ is_valid_state(struct drbd_device *device, union drbd_state ns)
 	else if (ns.conn >= C_CONNECTED && ns.pdsk == D_UNKNOWN)
 		rv = SS_CONNECTED_OUTDATES;
 
+out:
 	rcu_read_unlock();
 
 	return rv;
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web