All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guillermo O. Freschi <kedrot@gmail.com>
To: Oleg Drokin <oleg.drokin@intel.com>,
	lustre-devel@lists.lustre.org, linux-kernel@vger.kernel.org
Cc: "Guillermo O. Freschi" <kedrot@gmail.com>
Subject: [lustre-devel] [PATCH 2/2] Style fixes
Date: Mon, 26 Dec 2016 15:44:05 -0000	[thread overview]
Message-ID: <20161226154339.8916-2-kedrot@gmail.com> (raw)
In-Reply-To: <20161226154339.8916-1-kedrot@gmail.com>

Missing braces on `if` statement; misaligned parameter.

Signed-off-by: Guillermo O. Freschi <kedrot@gmail.com>
---
 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
index f4cbc89b4f24..a23e7ada3891 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
@@ -1024,11 +1024,11 @@ void ldlm_grant_lock(struct ldlm_lock *lock, struct list_head *work_list)
 	if (work_list && lock->l_completion_ast)
 		ldlm_add_ast_work_item(lock, NULL, work_list);
 
-	if (res->lr_type == LDLM_PLAIN || res->lr_type == LDLM_IBITS)
+	if (res->lr_type == LDLM_PLAIN || res->lr_type == LDLM_IBITS) {
 		ldlm_grant_lock_with_skiplist(lock);
-	else if (res->lr_type == LDLM_EXTENT)
+	} else if (res->lr_type == LDLM_EXTENT) {
 		ldlm_extent_add_lock(res, lock);
-	else if (res->lr_type == LDLM_FLOCK) {
+	} else if (res->lr_type == LDLM_FLOCK) {
 		/*
 		 * We should not add locks to granted list in the following cases:
 		 * - this is an UNLOCK but not a real lock;
@@ -1040,8 +1040,9 @@ void ldlm_grant_lock(struct ldlm_lock *lock, struct list_head *work_list)
 		    ldlm_is_test_lock(lock) || ldlm_is_flock_deadlock(lock))
 			return;
 		ldlm_resource_add_lock(res, &res->lr_granted, lock);
-	} else
+	} else {
 		LBUG();
+	}
 
 	ldlm_pool_add(&ldlm_res_to_ns(res)->ns_pool, lock);
 }
@@ -1481,7 +1482,8 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill,
 							lustre_swab_ost_lvb_v1);
 			else
 				lvb = req_capsule_server_sized_swab_get(pill,
-						&RMF_DLM_LVB, size,
+									&RMF_DLM_LVB,
+									size,
 						lustre_swab_ost_lvb_v1);
 			if (unlikely(!lvb)) {
 				LDLM_ERROR(lock, "no LVB");
-- 
2.11.0

WARNING: multiple messages have this Message-ID (diff)
From: "Guillermo O. Freschi" <kedrot@gmail.com>
To: Oleg Drokin <oleg.drokin@intel.com>,
	lustre-devel@lists.lustre.org, linux-kernel@vger.kernel.org
Cc: "Guillermo O. Freschi" <kedrot@gmail.com>
Subject: [PATCH 2/2] Style fixes
Date: Mon, 26 Dec 2016 12:43:39 -0300	[thread overview]
Message-ID: <20161226154339.8916-2-kedrot@gmail.com> (raw)
In-Reply-To: <20161226154339.8916-1-kedrot@gmail.com>

Missing braces on `if` statement; misaligned parameter.

Signed-off-by: Guillermo O. Freschi <kedrot@gmail.com>
---
 drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
index f4cbc89b4f24..a23e7ada3891 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c
@@ -1024,11 +1024,11 @@ void ldlm_grant_lock(struct ldlm_lock *lock, struct list_head *work_list)
 	if (work_list && lock->l_completion_ast)
 		ldlm_add_ast_work_item(lock, NULL, work_list);
 
-	if (res->lr_type == LDLM_PLAIN || res->lr_type == LDLM_IBITS)
+	if (res->lr_type == LDLM_PLAIN || res->lr_type == LDLM_IBITS) {
 		ldlm_grant_lock_with_skiplist(lock);
-	else if (res->lr_type == LDLM_EXTENT)
+	} else if (res->lr_type == LDLM_EXTENT) {
 		ldlm_extent_add_lock(res, lock);
-	else if (res->lr_type == LDLM_FLOCK) {
+	} else if (res->lr_type == LDLM_FLOCK) {
 		/*
 		 * We should not add locks to granted list in the following cases:
 		 * - this is an UNLOCK but not a real lock;
@@ -1040,8 +1040,9 @@ void ldlm_grant_lock(struct ldlm_lock *lock, struct list_head *work_list)
 		    ldlm_is_test_lock(lock) || ldlm_is_flock_deadlock(lock))
 			return;
 		ldlm_resource_add_lock(res, &res->lr_granted, lock);
-	} else
+	} else {
 		LBUG();
+	}
 
 	ldlm_pool_add(&ldlm_res_to_ns(res)->ns_pool, lock);
 }
@@ -1481,7 +1482,8 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill,
 							lustre_swab_ost_lvb_v1);
 			else
 				lvb = req_capsule_server_sized_swab_get(pill,
-						&RMF_DLM_LVB, size,
+									&RMF_DLM_LVB,
+									size,
 						lustre_swab_ost_lvb_v1);
 			if (unlikely(!lvb)) {
 				LDLM_ERROR(lock, "no LVB");
-- 
2.11.0

  reply	other threads:[~2016-12-26 15:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-26 15:43 [PATCH 1/2] Fixed signedness check Guillermo O. Freschi
2016-12-26 15:44 ` [lustre-devel] " Guillermo O. Freschi
2016-12-26 15:43 ` Guillermo O. Freschi [this message]
2016-12-26 15:44   ` [lustre-devel] [PATCH 2/2] Style fixes Guillermo O. Freschi
2017-01-13  1:20   ` Dilger, Andreas
2017-01-13  1:20     ` Dilger, Andreas
2017-01-13 20:48   ` [PATCH v2] " Guillermo O. Freschi
2017-01-16 16:45     ` [lustre-devel] " Oleg Drokin
2017-01-16 16:45       ` Oleg Drokin
2017-01-13  1:17 ` [lustre-devel] [PATCH 1/2] Fixed signedness check Dilger, Andreas
2017-01-13  1:17   ` Dilger, Andreas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161226154339.8916-2-kedrot@gmail.com \
    --to=kedrot@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lustre-devel@lists.lustre.org \
    --cc=oleg.drokin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.