From: Ozgur Karatas <okaratas@member.fsf.org>
To: tglx@linutronix.de, dave@stgolabs.net, dvhart@linux.intel.com,
bigeasy@linutronix.de, mgorman@suse.de,
dingel@linux.vnet.ibm.com, kirill.shutemov@linux.intel.com
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
akpm@linux-foundation.org
Subject: [PATCH 1/1] kernel: futex: fixed to else and initcall
Date: Mon, 19 Dec 2016 22:53:09 +0200 [thread overview]
Message-ID: <263091482180789@web35j.yandex.ru> (raw)
The include/linux/init.h file have to content; to not used __initcall functions.
I think, needs to be replaced to device_initcall.
device_initcall() or more appropriate function instead of __initcall.
else doesn't need to be used, if should be enclosed in parentheses.
Also, I used checkpatch scripts and fixed to errors.
ERROR: "(foo*)" should be "(foo *)"
ERROR: "foo * bar" should be "foo *bar"
ERROR: "foo * bar" should be "foo *bar"
Signed-off-by: Ozgur Karatas <okaratas@member.fsf.org>
---
kernel/futex.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/kernel/futex.c b/kernel/futex.c
index 2c4be46..fd8a451 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -390,7 +390,7 @@ static inline int hb_waiters_pending(struct futex_hash_bucket *hb)
*/
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 & (futex_hashsize - 1)];
@@ -545,10 +545,10 @@ get_futex_key(u32 __user *uaddr, int fshared, union futex_key *key, int rw)
err = get_user_pages_fast(address, 1, 0, &page);
ro = 1;
}
- if (err < 0)
+ if (err < 0) {
return err;
- else
err = 0;
+ }
/*
* The treatment of mapping from this point on is critical. The page
@@ -800,7 +800,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;
@@ -854,7 +854,7 @@ static void put_pi_state(struct futex_pi_state *pi_state)
* 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;
@@ -3323,4 +3323,4 @@ static int __init futex_init(void)
return 0;
}
-__initcall(futex_init);
+device_initcall(futex_init);
--
2.1.4
next reply other threads:[~2016-12-19 20:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-19 20:53 Ozgur Karatas [this message]
2016-12-20 9:18 ` Thomas Gleixner
2016-12-20 9:39 ` Ozgur Karatas
2016-12-20 10:36 ` 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=263091482180789@web35j.yandex.ru \
--to=okaratas@member.fsf.org \
--cc=akpm@linux-foundation.org \
--cc=bigeasy@linutronix.de \
--cc=dave@stgolabs.net \
--cc=dingel@linux.vnet.ibm.com \
--cc=dvhart@linux.intel.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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®