public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/7] Kernel: space and brace fixes for user_namespace.c
@ 2011-06-07 10:39 Akshay Joshi
  2011-06-07 10:39 ` [PATCH 3/7] Kernel: Fix trailing whitespace in user.c Akshay Joshi
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Akshay Joshi @ 2011-06-07 10:39 UTC (permalink / raw)
  Cc: Akshay Joshi, Serge E. Hallyn, Andrew Morton, Eric W. Biederman,
	David S. Miller, Pavel Emelyanov, linux-kernel

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

Signed-off-by: Akshay Joshi <me@akshayjoshi.com>
---
 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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-06-07 15:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-07 10:39 [PATCH 2/7] Kernel: space and brace fixes for user_namespace.c Akshay Joshi
2011-06-07 10:39 ` [PATCH 3/7] Kernel: Fix trailing whitespace in user.c Akshay Joshi
2011-06-07 10:39 ` [PATCH 4/7] Kernel: convert leading spaces to tabs in uid16.c Akshay Joshi
2011-06-07 15:43   ` Akshay Joshi
2011-06-07 10:39 ` [PATCH 5/7] Kernel: add spaces where required by the coding style in acct.c Akshay Joshi
2011-06-07 10:39 ` [PATCH 6/7] Kernel: fix spaces with respect to the coding style in sys.c Akshay Joshi
2011-06-07 13:30   ` David Howells
     [not found]     ` <BANLkTikkBgYx2qPVEXyyAbr0Vsi=_vORqA@mail.gmail.com>
2011-06-07 14:54       ` David Howells
2011-06-07 15:44     ` Akshay Joshi
2011-06-07 10:39 ` [PATCH 7/7] Kernel: style fixes to spaces for sysctl.c Akshay Joshi
2011-06-07 15:41 ` [PATCH 3/7] Kernel: Fix trailing whitespace in user.c Akshay Joshi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox