mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tracey Dent <tdent48227@gmail.com>
To: dwmw2@infradead.org
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] fs/jffs2/xattr: Fix coding style
Date: Mon, 21 Feb 2011 04:39:02 -0500	[thread overview]
Message-ID: <20110221093902.GA4759@linux-rdzc.hsd1.mi.comcast.net> (raw)

Remove the trailing white space and get rid of the
unnessary {} on certain statements.

Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
 fs/jffs2/xattr.c |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c
index 4f9cc04..d66bb03 100644
--- a/fs/jffs2/xattr.c
+++ b/fs/jffs2/xattr.c
@@ -31,7 +31,7 @@
  *   is used to release xattr name/value pair and detach from c->xattrindex.
  * reclaim_xattr_datum(c)
  *   is used to reclaim xattr name/value pairs on the xattr name/value pair cache when
- *   memory usage by cache is over c->xdatum_mem_threshold. Currently, this threshold 
+ *   memory usage by cache is over c->xdatum_mem_threshold. Currently, this threshold
  *   is hard coded as 32KiB.
  * do_verify_xattr_datum(c, xd)
  *   is used to load the xdatum informations without name/value pair from the medium.
@@ -109,11 +109,11 @@ static void reclaim_xattr_datum(struct jffs2_sb_info *c)
 	target = c->xdatum_mem_usage * 4 / 5; /* 20% reduction */
 	for (count = 0; count < XATTRINDEX_HASHSIZE; count++) {
 		list_for_each_entry_safe(xd, _xd, &c->xattrindex[index], xindex) {
-			if (xd->flags & JFFS2_XFLAGS_HOT) {
+			if (xd->flags & JFFS2_XFLAGS_HOT)
 				xd->flags &= ~JFFS2_XFLAGS_HOT;
-			} else if (!(xd->flags & JFFS2_XFLAGS_BIND)) {
+			else if (!(xd->flags & JFFS2_XFLAGS_BIND))
 				unload_xattr_datum(c, xd);
-			}
+
 			if (c->xdatum_mem_usage <= target)
 				goto out;
 		}
@@ -1002,11 +1002,11 @@ ssize_t jffs2_listxattr(struct dentry *dentry, char *buffer, size_t size)
 	}
 	rc = len;
  out:
-	if (!retry) {
+	if (!retry)
 		up_read(&c->xattr_sem);
-	} else {
+	else
 		up_write(&c->xattr_sem);
-	}
+
 	return rc;
 }
 
@@ -1053,22 +1053,22 @@ int do_jffs2_getxattr(struct inode *inode, int xprefix, const char *xname,
 		if (!strcmp(xname, xd->xname)) {
 			rc = xd->value_len;
 			if (buffer) {
-				if (size < rc) {
+				if (size < rc)
 					rc = -ERANGE;
-				} else {
+				else
 					memcpy(buffer, xd->xvalue, rc);
-				}
+
 			}
 			goto out;
 		}
 	}
 	rc = -ENODATA;
  out:
-	if (!retry) {
+	if (!retry)
 		up_read(&c->xattr_sem);
-	} else {
+	else
 		up_write(&c->xattr_sem);
-	}
+
 	return rc;
 }
 
-- 
1.7.4.1.48.g5673d


-- 

             reply	other threads:[~2011-02-21 14:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-21  9:39 Tracey Dent [this message]
2011-02-25 10:51 ` Artem Bityutskiy
2011-02-26 16:15 Tracey Dent
2011-02-28 13:56 ` Artem Bityutskiy

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=20110221093902.GA4759@linux-rdzc.hsd1.mi.comcast.net \
    --to=tdent48227@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    /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

all inboxes | Powered by JetHome®