Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
From: "Tobin C. Harding" <me@tobin.cc>
To: Philipp Reisner <philipp.reisner@linbit.com>,
	Lars Ellenberg <lars.ellenberg@linbit.com>
Cc: drbd-dev@lists.linbit.com
Subject: [Drbd-dev] [PATCH 03/17] lru_cache: move trailing */ to a separate line
Date: Mon,  2 Oct 2017 09:34:02 +1100	[thread overview]
Message-ID: <1506897256-14072-4-git-send-email-me@tobin.cc> (raw)
In-Reply-To: <1506897256-14072-1-git-send-email-me@tobin.cc>

checkpatch emits WARNING: Block comments use a trailing */ on a
separate line.

Move trailing */ to a separate line.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
---
 lib/lru_cache.c | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/lib/lru_cache.c b/lib/lru_cache.c
index 273af4b..898feb9 100644
--- a/lib/lru_cache.c
+++ b/lib/lru_cache.c
@@ -30,8 +30,9 @@ MODULE_AUTHOR("Philipp Reisner <phil@linbit.com>, "
 MODULE_DESCRIPTION("lru_cache - Track sets of hot objects");
 MODULE_LICENSE("GPL");
 
-/* this is developers aid only.
- * it catches concurrent access (lack of locking on the users part) */
+/* This is developers aid only.
+ * it catches concurrent access (lack of locking on the users part)
+ */
 #define PARANOIA_ENTRY() do {		\
 	BUG_ON(!lc);			\
 	BUG_ON(!lc->nr_elements);	\
@@ -69,7 +70,8 @@ int lc_try_lock(struct lru_cache *lc)
 	return 0 == val;
 #if 0
 	/* Alternative approach, spin in case someone enters or leaves a
-	 * PARANOIA_ENTRY()/RETURN() section. */
+	 * PARANOIA_ENTRY()/RETURN() section.
+	 */
 	unsigned long old, new, val;
 	do {
 		old = lc->flags & LC_PARANOIA;
@@ -107,7 +109,8 @@ struct lru_cache *lc_create(const char *name, struct kmem_cache *cache,
 		return NULL;
 
 	/* e_count too big; would probably fail the allocation below anyways.
-	 * for typical use cases, e_count should be few thousand at most. */
+	 * for typical use cases, e_count should be few thousand at most.
+	 */
 	if (e_count > LC_MAX_ACTIVE)
 		return NULL;
 
@@ -263,7 +266,8 @@ static struct lc_element *__lc_find(struct lru_cache *lc, unsigned int enr,
 	hlist_for_each_entry(e, lc_hash_slot(lc, enr), colision) {
 		/* "about to be changed" elements, pending transaction commit,
 		 * are hashed by their "new number". "Normal" elements have
-		 * lc_number == lc_new_number. */
+		 * lc_number == lc_new_number.
+		 */
 		if (e->lc_new_number != enr)
 			continue;
 		if (e->lc_new_number == e->lc_number || include_changing)
@@ -379,7 +383,8 @@ static struct lc_element *__lc_get(struct lru_cache *lc, unsigned int enr, unsig
 	/* if lc_new_number != lc_number,
 	 * this enr is currently being pulled in already,
 	 * and will be available once the pending transaction
-	 * has been committed. */
+	 * has been committed.
+	 */
 	if (e) {
 		if (e->lc_new_number != e->lc_number) {
 			/* It has been found above, but on the "to_be_changed"
@@ -389,7 +394,8 @@ static struct lc_element *__lc_get(struct lru_cache *lc, unsigned int enr, unsig
 			if (!(flags & LC_GET_MAY_USE_UNCOMMITTED))
 				RETURN(NULL);
 			/* ... unless the caller is aware of the implications,
-			 * probably preparing a cumulative transaction. */
+			 * probably preparing a cumulative transaction.
+			 */
 			++e->refcnt;
 			++lc->hits;
 			RETURN(e);
@@ -408,7 +414,8 @@ static struct lc_element *__lc_get(struct lru_cache *lc, unsigned int enr, unsig
 		RETURN(NULL);
 
 	/* To avoid races with lc_try_lock(), first, mark us dirty
-	 * (using test_and_set_bit, as it implies memory barriers), ... */
+	 * (using test_and_set_bit, as it implies memory barriers), ...
+	 */
 	test_and_set_bit(__LC_DIRTY, &lc->flags);
 
 	/* ... only then check if it is locked anyways. If lc_unlock clears
@@ -429,7 +436,8 @@ static struct lc_element *__lc_get(struct lru_cache *lc, unsigned int enr, unsig
 
 	/* It was not present in the active set.  We are going to recycle an
 	 * unused (or even "free") element, but we won't accumulate more than
-	 * max_pending_changes changes.  */
+	 * max_pending_changes changes.
+	 */
 	if (lc->pending_changes >= lc->max_pending_changes)
 		RETURN(NULL);
 
-- 
2.7.4


  parent reply	other threads:[~2017-10-01 22:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-01 22:33 [Drbd-dev] [PATCH 00/17] lru_cache: checkpatch clean ups Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 01/17] lru_cache: remove FSF address from licence Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 02/17] lru_cache: fix licence comment format Tobin C. Harding
2017-10-01 22:34 ` Tobin C. Harding [this message]
2017-10-01 22:34 ` [Drbd-dev] [PATCH 04/17] lru_cache: remove quoted string across lines Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 05/17] lru_cache: use 'unsigned int' instead of 'unsigned' Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 06/17] lru_cache: use kcalloc instead of kzalloc with multiply Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 07/17] lru_cache: clean macro definition Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 08/17] lru_cache: add blank line after declarations Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 09/17] lru_cache: remove space after function name Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 10/17] lru_cache: fix function argument alignment Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 11/17] lru_cache: remove multiple blank lines Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 12/17] lru_cache: remove space before tabs Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 13/17] lru_cache: move constant to the right side of test Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 14/17] lru_cache: use braces on all arms of statement Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 15/17] lru_cache: remove unnecessary space before arguments Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 16/17] lru_cache: add spaces around '|' Tobin C. Harding
2017-10-01 22:34 ` [Drbd-dev] [PATCH 17/17] lru_cache: move EXPORT_SYMBOL macro to follow function Tobin C. Harding
2017-10-02 13:13 ` [Drbd-dev] [PATCH 00/17] lru_cache: checkpatch clean ups Lars Ellenberg
2017-10-02 22:06   ` Tobin C. Harding

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=1506897256-14072-4-git-send-email-me@tobin.cc \
    --to=me@tobin.cc \
    --cc=drbd-dev@lists.linbit.com \
    --cc=lars.ellenberg@linbit.com \
    --cc=philipp.reisner@linbit.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox