From: Daniel Walker <dwalker@mvista.com>
To: linux-kernel@vger.kernel.org
Cc: Ulrich Drepper <drepper@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Arjan van de Ven <arjan@infradead.org>
Subject: [PATCH 1/5] futex: checkpatch cleanup
Date: Wed, 11 Jun 2008 13:49:17 -0700 [thread overview]
Message-ID: <20080611204916.271608740@mvista.com> (raw)
[-- Attachment #1: futex-checkpatch-cleanup.patch --]
[-- Type: text/plain, Size: 4766 bytes --]
Signed-off-by: Daniel Walker <dwalker@mvista.com>
---
kernel/futex.c | 52 +++++++++++++++++++++++++++-------------------------
1 file changed, 27 insertions(+), 25 deletions(-)
Index: linux-2.6.25/kernel/futex.c
===================================================================
--- linux-2.6.25.orig/kernel/futex.c
+++ linux-2.6.25/kernel/futex.c
@@ -145,7 +145,7 @@ static inline void futex_unlock_mm(struc
*/
static struct futex_hash_bucket *hash_futex(union futex_key *key)
{
- u32 hash = jhash2((u32*)&key->both.word,
+ u32 hash = jhash2((u32 *)&key->both.word,
(sizeof(key->both.word)+sizeof(key->both.ptr))/4,
key->both.offset);
return &futex_queues[hash & ((1 << FUTEX_HASHBITS)-1)];
@@ -234,7 +234,8 @@ static int get_futex_key(u32 __user *uad
* mappings of _writable_ handles.
*/
if (likely(!(vma->vm_flags & VM_MAYSHARE))) {
- key->both.offset |= FUT_OFF_MMSHARED; /* reference taken on mm */
+ /* reference taken on mm */
+ key->both.offset |= FUT_OFF_MMSHARED;
key->private.mm = mm;
key->private.address = address;
return 0;
@@ -277,12 +278,12 @@ static void get_futex_key_refs(union fut
if (key->both.ptr == NULL)
return;
switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) {
- case FUT_OFF_INODE:
- atomic_inc(&key->shared.inode->i_count);
- break;
- case FUT_OFF_MMSHARED:
- atomic_inc(&key->private.mm->mm_count);
- break;
+ case FUT_OFF_INODE:
+ atomic_inc(&key->shared.inode->i_count);
+ break;
+ case FUT_OFF_MMSHARED:
+ atomic_inc(&key->private.mm->mm_count);
+ break;
}
}
@@ -295,12 +296,12 @@ static void drop_futex_key_refs(union fu
if (!key->both.ptr)
return;
switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) {
- case FUT_OFF_INODE:
- iput(key->shared.inode);
- break;
- case FUT_OFF_MMSHARED:
- mmdrop(key->private.mm);
- break;
+ case FUT_OFF_INODE:
+ iput(key->shared.inode);
+ break;
+ case FUT_OFF_MMSHARED:
+ mmdrop(key->private.mm);
+ break;
}
}
@@ -333,7 +334,7 @@ static int get_futex_value_locked(u32 *d
static int futex_handle_fault(unsigned long address,
struct rw_semaphore *fshared, int attempt)
{
- struct vm_area_struct * vma;
+ struct vm_area_struct *vma;
struct mm_struct *mm = current->mm;
int ret = -EFAULT;
@@ -391,7 +392,7 @@ static int refill_pi_state_cache(void)
return 0;
}
-static struct futex_pi_state * alloc_pi_state(void)
+static struct futex_pi_state *alloc_pi_state(void)
{
struct futex_pi_state *pi_state = current->pi_state_cache;
@@ -436,7 +437,7 @@ static void free_pi_state(struct futex_p
* Look up the task based on what TID userspace gave us.
* We dont trust it.
*/
-static struct task_struct * futex_find_get_task(pid_t pid)
+static struct task_struct *futex_find_get_task(pid_t pid)
{
struct task_struct *p;
@@ -742,7 +743,7 @@ static int futex_wake(u32 __user *uaddr,
head = &hb->chain;
plist_for_each_entry_safe(this, next, head, list) {
- if (match_futex (&this->key, &key)) {
+ if (match_futex(&this->key, &key)) {
if (this->pi_state) {
ret = -EINVAL;
break;
@@ -848,7 +849,7 @@ retry:
head = &hb1->chain;
plist_for_each_entry_safe(this, next, head, list) {
- if (match_futex (&this->key, &key1)) {
+ if (match_futex(&this->key, &key1)) {
wake_futex(this);
if (++ret >= nr_wake)
break;
@@ -860,7 +861,7 @@ retry:
op_ret = 0;
plist_for_each_entry_safe(this, next, head, list) {
- if (match_futex (&this->key, &key2)) {
+ if (match_futex(&this->key, &key2)) {
wake_futex(this);
if (++op_ret >= nr_wake2)
break;
@@ -938,7 +939,7 @@ static int futex_requeue(u32 __user *uad
head1 = &hb1->chain;
plist_for_each_entry_safe(this, next, head1, list) {
- if (!match_futex (&this->key, &key1))
+ if (!match_futex(&this->key, &key1))
continue;
if (++ret <= nr_wake) {
wake_futex(this);
@@ -1648,7 +1649,8 @@ retry_unlocked:
* anyone else up:
*/
if (!(uval & FUTEX_OWNER_DIED))
- uval = cmpxchg_futex_value_locked(uaddr, task_pid_vnr(current), 0);
+ uval = cmpxchg_futex_value_locked(uaddr,
+ task_pid_vnr(current), 0);
if (unlikely(uval == -EFAULT))
@@ -1667,7 +1669,7 @@ retry_unlocked:
head = &hb->chain;
plist_for_each_entry_safe(this, next, head, list) {
- if (!match_futex (&this->key, &key))
+ if (!match_futex(&this->key, &key))
continue;
ret = wake_futex_pi(uaddr, uval, this);
/*
@@ -1913,8 +1915,8 @@ void exit_robust_list(struct task_struct
* don't process it twice:
*/
if (entry != pending)
- if (handle_futex_death((void __user *)entry + futex_offset,
- curr, pi))
+ if (handle_futex_death((void __user *)entry +
+ futex_offset, curr, pi))
return;
if (rc)
return;
--
next reply other threads:[~2008-06-11 20:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-11 20:49 Daniel Walker [this message]
2008-06-11 20:49 ` [PATCH 2/5] futex: update prio on requeue Daniel Walker
2008-06-12 5:22 ` Peter Zijlstra
2008-06-11 20:49 ` [PATCH 3/5] mutex debug: add generic blocked_on usage Daniel Walker
2008-06-12 5:25 ` Peter Zijlstra
2008-06-12 13:21 ` Daniel Walker
2008-06-11 20:49 ` [PATCH 4/5] rtmutex: " Daniel Walker
2008-06-11 20:49 ` [PATCH 5/5] futex: fix miss ordered wakeups Daniel Walker
2008-06-12 6:07 ` Peter Zijlstra
2008-06-12 13:22 ` Daniel Walker
2008-06-12 13:57 ` Peter Zijlstra
2008-06-12 14:04 ` Daniel Walker
2008-06-12 8:56 ` Thomas Gleixner
2008-06-12 13:30 ` Daniel Walker
2008-06-12 13:33 ` Thomas Gleixner
2008-06-12 13:44 ` Daniel Walker
2008-06-12 15:24 ` Thomas Gleixner
2008-06-12 15:56 ` Daniel Walker
2008-06-12 19:55 ` Thomas Gleixner
2008-06-12 22:09 ` Daniel Walker
2008-06-12 22:43 ` Thomas Gleixner
2008-06-12 23:06 ` Daniel Walker
2008-06-12 23:30 ` Thomas Gleixner
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=20080611204916.271608740@mvista.com \
--to=dwalker@mvista.com \
--cc=arjan@infradead.org \
--cc=drepper@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.