From: tip-bot for Vasily Averin <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, arnd@arndb.de, vvs@virtuozzo.com,
hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de
Subject: [tip:locking/urgent] futex: Cleanup generic SMP variant of arch_futex_atomic_op_inuser()
Date: Mon, 22 Jul 2019 02:25:07 -0700 [thread overview]
Message-ID: <tip-f9adc23ee91e6f561bb70c6147d8d45bd164d62f@git.kernel.org> (raw)
In-Reply-To: <12bdaca8-99eb-e576-f842-5970ab1d6a92@virtuozzo.com>
Commit-ID: f9adc23ee91e6f561bb70c6147d8d45bd164d62f
Gitweb: https://git.kernel.org/tip/f9adc23ee91e6f561bb70c6147d8d45bd164d62f
Author: Vasily Averin <vvs@virtuozzo.com>
AuthorDate: Tue, 16 Jul 2019 09:22:03 +0300
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 22 Jul 2019 11:20:10 +0200
futex: Cleanup generic SMP variant of arch_futex_atomic_op_inuser()
The generic SMP variant of arch_futex_atomic_op_inuser() returns always
-ENOSYS so the switch case and surrounding code are pointless. Remove it
and just return -ENOSYS.
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lkml.kernel.org/r/12bdaca8-99eb-e576-f842-5970ab1d6a92@virtuozzo.com
---
include/asm-generic/futex.h | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/include/asm-generic/futex.h b/include/asm-generic/futex.h
index 8666fe7f35d7..02970b11f71f 100644
--- a/include/asm-generic/futex.h
+++ b/include/asm-generic/futex.h
@@ -118,26 +118,7 @@ futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr,
static inline int
arch_futex_atomic_op_inuser(int op, u32 oparg, int *oval, u32 __user *uaddr)
{
- int oldval = 0, ret;
-
- pagefault_disable();
-
- switch (op) {
- case FUTEX_OP_SET:
- case FUTEX_OP_ADD:
- case FUTEX_OP_OR:
- case FUTEX_OP_ANDN:
- case FUTEX_OP_XOR:
- default:
- ret = -ENOSYS;
- }
-
- pagefault_enable();
-
- if (!ret)
- *oval = oldval;
-
- return ret;
+ return -ENOSYS;
}
static inline int
next prev parent reply other threads:[~2019-07-22 9:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 10:27 [PATCH] generic arch_futex_atomic_op_inuser() cleanup Vasily Averin
2019-07-15 10:29 ` Vasily Averin
2019-07-15 12:06 ` Arnd Bergmann
2019-07-15 13:15 ` Thomas Gleixner
2019-07-16 6:22 ` [PATCH v2] futex: " Vasily Averin
2019-07-16 12:46 ` Arnd Bergmann
2019-07-22 9:25 ` tip-bot for Vasily Averin [this message]
2019-07-15 13:13 ` [PATCH] " 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=tip-f9adc23ee91e6f561bb70c6147d8d45bd164d62f@git.kernel.org \
--to=tipbot@zytor.com \
--cc=arnd@arndb.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=vvs@virtuozzo.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
Powered by JetHome