public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
To: akpm@osdl.org
Cc: "David C. Hansen" <haveblue@us.ibm.com>,
	clg@fr.ibm.com, serue@us.ibm.com, linux-kernel@vger.kernel.org,
	containers@lists.osdl.org
Subject: [PATCH] Coding style - Use struct pidmap
Date: Wed, 16 Aug 2006 16:34:04 -0700	[thread overview]
Message-ID: <20060816233404.GA10635@us.ibm.com> (raw)


Use struct pidmap instead of pidmap_t.

Its a subset of Eric Biederman's patch http://lkml.org/lkml/2006/2/6/271.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Serge Hallyn <serue@us.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: <containers@lists.osdl.org>

 kernel/pid.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

Index: linux-2.6.18-rc3/kernel/pid.c
===================================================================
--- linux-2.6.18-rc3.orig/kernel/pid.c	2006-08-10 17:58:55.000000000 -0700
+++ linux-2.6.18-rc3/kernel/pid.c	2006-08-10 18:32:20.000000000 -0700
@@ -53,12 +53,12 @@ int pid_max_max = PID_MAX_LIMIT;
  * value does not cause lots of bitmaps to be allocated, but
  * the scheme scales to up to 4 million PIDs, runtime.
  */
-typedef struct pidmap {
+struct pidmap {
 	atomic_t nr_free;
 	void *page;
-} pidmap_t;
+};
 
-static pidmap_t pidmap_array[PIDMAP_ENTRIES] =
+static struct pidmap pidmap_array[PIDMAP_ENTRIES] =
 	 { [ 0 ... PIDMAP_ENTRIES-1 ] = { ATOMIC_INIT(BITS_PER_PAGE), NULL } };
 
 /*
@@ -78,7 +78,7 @@ static  __cacheline_aligned_in_smp DEFIN
 
 static fastcall void free_pidmap(int pid)
 {
-	pidmap_t *map = pidmap_array + pid / BITS_PER_PAGE;
+	struct pidmap *map = pidmap_array + pid / BITS_PER_PAGE;
 	int offset = pid & BITS_PER_PAGE_MASK;
 
 	clear_bit(offset, map->page);
@@ -88,7 +88,7 @@ static fastcall void free_pidmap(int pid
 static int alloc_pidmap(void)
 {
 	int i, offset, max_scan, pid, last = last_pid;
-	pidmap_t *map;
+	struct pidmap *map;
 
 	pid = last + 1;
 	if (pid >= pid_max)

                 reply	other threads:[~2006-08-16 23:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20060816233404.GA10635@us.ibm.com \
    --to=sukadev@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=clg@fr.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=serue@us.ibm.com \
    /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