mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Akshay Joshi <me@akshayjoshi.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Akshay Joshi <me@akshayjoshi.com>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"David S. Miller" <davem@davemloft.net>,
	Pavel Emelyanov <xemul@openvz.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/7] Kernel: space and brace fixes for user_namespace.c
Date: Tue,  7 Jun 2011 06:39:35 -0400	[thread overview]
Message-ID: <1307443181-22278-2-git-send-email-me@akshayjoshi.com> (raw)

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


             reply	other threads:[~2011-06-07 10:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <BANLkTikkBgYx2qPVEXyyAbr0Vsi=_vORqA@mail.gmail.com>
2011-06-07 10:39 ` Akshay Joshi [this message]
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 10:39   ` [PATCH 7/7] Kernel: style fixes to spaces for sysctl.c Akshay Joshi
2011-06-07 13:30   ` [PATCH 6/7] Kernel: fix spaces with respect to the coding style in sys.c David Howells
2011-06-07 14:54     ` David Howells
2011-06-07 15:44     ` Akshay Joshi
2011-06-07 15:41   ` [PATCH 3/7] Kernel: Fix trailing whitespace in user.c Akshay Joshi

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=1307443181-22278-2-git-send-email-me@akshayjoshi.com \
    --to=me@akshayjoshi.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=serge@hallyn.com \
    --cc=xemul@openvz.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®