* [PATCH] fs/jffs2/xattr: Fix coding style
@ 2011-02-21 9:39 Tracey Dent
2011-02-25 10:51 ` Artem Bityutskiy
0 siblings, 1 reply; 4+ messages in thread
From: Tracey Dent @ 2011-02-21 9:39 UTC (permalink / raw)
To: dwmw2; +Cc: linux-mtd, linux-kernel
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
--
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fs/jffs2/xattr: Fix coding style
2011-02-21 9:39 [PATCH] fs/jffs2/xattr: Fix coding style Tracey Dent
@ 2011-02-25 10:51 ` Artem Bityutskiy
0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2011-02-25 10:51 UTC (permalink / raw)
To: Tracey Dent; +Cc: linux-mtd, dwmw2, linux-kernel
On Mon, 2011-02-21 at 04:39 -0500, Tracey Dent wrote:
> Remove the trailing white space and get rid of the
> unnessary {} on certain statements.
>
> Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Could you please do one change per patch?
Make first patch to only fix the trailing white-space issue. I'd take it
to my tree immediately. You can make the second patch which removes
unnecessary {}, but this patch would be arguable, I'm not sure I'd take
it.
In any case, now I should reject whole patch, but in the "one patch per
logical change" case I'd take at least part of your work.
Thanks a lot!
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] fs/jffs2/xattr: Fix coding style
@ 2011-02-26 16:15 Tracey Dent
2011-02-28 13:56 ` Artem Bityutskiy
0 siblings, 1 reply; 4+ messages in thread
From: Tracey Dent @ 2011-02-26 16:15 UTC (permalink / raw)
To: tdent48227; +Cc: linux-mtd, dwmw2, linux-kernel, dedekind1
Remove the trailing white space.
Signed-off-by: Tracey Dent <tdent48227@gmail.com>
---
fs/jffs2/xattr.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c
index 4f9cc04..3e93cdd 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.
--
1.7.4.1.53.ga66ce
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fs/jffs2/xattr: Fix coding style
2011-02-26 16:15 Tracey Dent
@ 2011-02-28 13:56 ` Artem Bityutskiy
0 siblings, 0 replies; 4+ messages in thread
From: Artem Bityutskiy @ 2011-02-28 13:56 UTC (permalink / raw)
To: Tracey Dent; +Cc: linux-mtd, dwmw2, linux-kernel
On Sat, 2011-02-26 at 11:15 -0500, Tracey Dent wrote:
> Remove the trailing white space.
>
> Signed-off-by: Tracey Dent <tdent48227@gmail.com>
Pushed to l2-mtd-2.6.git tree, thanks.
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-02-28 13:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-21 9:39 [PATCH] fs/jffs2/xattr: Fix coding style Tracey Dent
2011-02-25 10:51 ` Artem Bityutskiy
-- strict thread matches above, loose matches on Subject: below --
2011-02-26 16:15 Tracey Dent
2011-02-28 13:56 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).