[Drbd-dev] [PATCH 08/17] lru_cache: add blank line after declarations

Tobin C. Harding me at tobin.cc
Mon Oct 2 00:34:07 CEST 2017


checkpatch emits WARNING: Missing a blank line after declarations.
Clearing this warning for variables declared within code blocks
that are not function definitions is of questionable benefit. Let's
just clear the function level declarations.

Add blank line after declarations.

Signed-off-by: Tobin C. Harding <me at tobin.cc>
---
 lib/lru_cache.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/lru_cache.c b/lib/lru_cache.c
index c15df31..34af31e 100644
--- a/lib/lru_cache.c
+++ b/lib/lru_cache.c
@@ -64,6 +64,7 @@ MODULE_LICENSE("GPL");
 int lc_try_lock(struct lru_cache *lc)
 {
 	unsigned long val;
+
 	do {
 		val = cmpxchg(&lc->flags, 0, LC_LOCKED);
 	} while (unlikely (val == LC_PARANOIA));
@@ -74,6 +75,7 @@ int lc_try_lock(struct lru_cache *lc)
 	 * PARANOIA_ENTRY()/RETURN() section.
 	 */
 	unsigned long old, new, val;
+
 	do {
 		old = lc->flags & LC_PARANOIA;
 		new = old | LC_LOCKED;
@@ -171,6 +173,7 @@ struct lru_cache *lc_create(const char *name, struct kmem_cache *cache,
 static void lc_free_by_index(struct lru_cache *lc, unsigned int i)
 {
 	void *p = lc->lc_element[i];
+
 	WARN_ON(!p);
 	if (p) {
 		p -= lc->element_off;
@@ -185,6 +188,7 @@ static void lc_free_by_index(struct lru_cache *lc, unsigned int i)
 void lc_destroy(struct lru_cache *lc)
 {
 	unsigned int i;
+
 	if (!lc)
 		return;
 	for (i = 0; i < lc->nr_elements; i++)
-- 
2.7.4



More information about the drbd-dev mailing list