Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932404AbcDYMQk (ORCPT ); Mon, 25 Apr 2016 08:16:40 -0400 Received: from zimbra13.linbit.com ([212.69.166.240]:39630 "EHLO zimbra13.linbit.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932360AbcDYMQc (ORCPT ); Mon, 25 Apr 2016 08:16:32 -0400 From: Philipp Reisner To: Jens Axboe , linux-kernel@vger.kernel.org Cc: drbd-dev@lists.linbit.com, Roland Kammerer , Philipp Reisner Subject: [PATCH 27/30] drbd: get rid of empty statement in is_valid_state Date: Mon, 25 Apr 2016 14:07:54 +0200 Message-Id: <1461586077-11581-28-git-send-email-philipp.reisner@linbit.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461586077-11581-1-git-send-email-philipp.reisner@linbit.com> References: <1461586077-11581-1-git-send-email-philipp.reisner@linbit.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1142 Lines: 35 From: Roland Kammerer This should silence a warning about an empty statement. Thanks to Fabian Frederick who sent a patch I modified to be smaller and avoids an additional indent level. Signed-off-by: Roland Kammerer Signed-off-by: Philipp Reisner --- 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