[PATCH 2/7] Kernel: space and brace fixes for user_namespace.c

From: Akshay Joshi
Date: Tue Jun 07 2011 - 06:40:15 EST


Fix the space prohibitions and unnecessary braces for single statement
blocks as reported by the checkpatch.pl tool.

Signed-off-by: Akshay Joshi <me@xxxxxxxxxxxxxxx>
---
kernel/user_namespace.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index 9da289c..4407b8b 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -97,12 +97,10 @@ uid_t user_ns_map_uid(struct user_namespace *to, const struct cred *cred, uid_t
/* Is cred->user the creator of the target user_ns
* or the creator of one of it's parents?
*/
- for ( tmp = to; tmp != &init_user_ns;
- tmp = tmp->creator->user_ns ) {
- if (cred->user == tmp->creator) {
+ for (tmp = to; tmp != &init_user_ns;
+ tmp = tmp->creator->user_ns)
+ if (cred->user == tmp->creator)
return (uid_t)0;
- }
- }

/* No useful relationship so no mapping */
return overflowuid;
@@ -118,12 +116,10 @@ gid_t user_ns_map_gid(struct user_namespace *to, const struct cred *cred, gid_t
/* Is cred->user the creator of the target user_ns
* or the creator of one of it's parents?
*/
- for ( tmp = to; tmp != &init_user_ns;
- tmp = tmp->creator->user_ns ) {
- if (cred->user == tmp->creator) {
+ for (tmp = to; tmp != &init_user_ns;
+ tmp = tmp->creator->user_ns)
+ if (cred->user == tmp->creator)
return (gid_t)0;
- }
- }

/* No useful relationship so no mapping */
return overflowgid;
--
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/