From: Dave Martin <Dave.Martin@arm.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org, Tony Luck <tony.luck@intel.com>,
Fenghua Yu <fenghua.yu@intel.com>
Subject: [RFC PATCH 08/11] ia64: Remove unused task argument from prctl functions
Date: Mon, 14 May 2018 18:14:24 +0100 [thread overview]
Message-ID: <1526318067-4964-9-git-send-email-Dave.Martin@arm.com> (raw)
In-Reply-To: <1526318067-4964-1-git-send-email-Dave.Martin@arm.com>
Some ia64-specific prctl backends take a task argument that is
redundant, since the only thing ever passed is "current".
This patch gets rid of the redundant arguments.
No functional change.
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
---
arch/ia64/include/asm/processor.h | 8 ++++----
kernel/sys.c | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/ia64/include/asm/processor.h b/arch/ia64/include/asm/processor.h
index 10061ccf..0489b80 100644
--- a/arch/ia64/include/asm/processor.h
+++ b/arch/ia64/include/asm/processor.h
@@ -259,15 +259,15 @@ typedef struct {
(int __user *) (addr)); \
})
-#define SET_FPEMU_CTL(task,value) \
+#define SET_FPEMU_CTL(value) \
({ \
- (task)->thread.flags = (((task)->thread.flags & ~IA64_THREAD_FPEMU_MASK) \
+ current->thread.flags = ((current->thread.flags & ~IA64_THREAD_FPEMU_MASK) \
| (((value) << IA64_THREAD_FPEMU_SHIFT) & IA64_THREAD_FPEMU_MASK)); \
0; \
})
-#define GET_FPEMU_CTL(task,addr) \
+#define GET_FPEMU_CTL(addr) \
({ \
- put_user(((task)->thread.flags & IA64_THREAD_FPEMU_MASK) >> IA64_THREAD_FPEMU_SHIFT, \
+ put_user((current->thread.flags & IA64_THREAD_FPEMU_MASK) >> IA64_THREAD_FPEMU_SHIFT, \
(int __user *) (addr)); \
})
diff --git a/kernel/sys.c b/kernel/sys.c
index b154561..5549505 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -78,10 +78,10 @@
# define GET_UNALIGN_CTL(a, b) (-EINVAL)
#endif
#ifndef SET_FPEMU_CTL
-# define SET_FPEMU_CTL(a, b) (-EINVAL)
+# define SET_FPEMU_CTL(a) (-EINVAL)
#endif
#ifndef GET_FPEMU_CTL
-# define GET_FPEMU_CTL(a, b) (-EINVAL)
+# define GET_FPEMU_CTL(a) (-EINVAL)
#endif
/*
@@ -2247,10 +2247,10 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
error = GET_UNALIGN_CTL(me, arg2);
break;
case PR_SET_FPEMU:
- error = SET_FPEMU_CTL(me, arg2);
+ error = SET_FPEMU_CTL(arg2);
break;
case PR_GET_FPEMU:
- error = GET_FPEMU_CTL(me, arg2);
+ error = GET_FPEMU_CTL(arg2);
break;
case PR_GET_TIMING:
error = PR_TIMING_STATISTICAL;
--
2.1.4
next prev parent reply other threads:[~2018-05-14 17:14 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 17:14 [RFC PATCH 00/11] prctl: Modernise wiring for optional prctl() calls Dave Martin
2018-05-14 17:14 ` Dave Martin
2018-05-14 17:14 ` [RFC PATCH 01/11] prctl: Support movement of arch prctls out of common code Dave Martin
2018-05-14 17:14 ` Dave Martin
2018-05-21 18:28 ` Will Deacon
2018-05-21 18:28 ` Will Deacon
2018-05-14 17:14 ` [RFC PATCH 02/11] arm64: Move arch-specific prctls out of core code Dave Martin
2018-05-14 17:14 ` Dave Martin
2018-05-21 18:30 ` Will Deacon
2018-05-21 18:30 ` Will Deacon
2018-05-14 17:14 ` [RFC PATCH 03/11] MIPS: Remove unused task argument from prctl functions Dave Martin
2018-05-14 17:14 ` Dave Martin
2018-05-14 17:14 ` [RFC PATCH 04/11] MIPS: Move arch-specific prctls out of core code Dave Martin
2018-05-14 17:14 ` Dave Martin
2018-05-14 17:14 ` [RFC PATCH 05/11] x86: " Dave Martin
2018-05-14 17:14 ` Dave Martin
2018-05-14 17:14 ` [RFC PATCH 06/11] powerpc: Remove unused task argument from prctl functions Dave Martin
2018-05-14 17:14 ` Dave Martin
2018-05-15 3:05 ` Michael Ellerman
2018-05-15 3:05 ` Michael Ellerman
2018-05-14 17:14 ` [RFC PATCH 07/11] powerpc: Move arch-specific prctls out of core code Dave Martin
2018-05-14 17:14 ` Dave Martin
2018-05-15 3:06 ` Michael Ellerman
2018-05-15 3:06 ` Michael Ellerman
2018-05-14 17:14 ` Dave Martin [this message]
2018-05-14 17:14 ` [RFC PATCH 08/11] ia64: Remove unused task argument from prctl functions Dave Martin
2018-05-14 17:14 ` [RFC PATCH 09/11] ia64: Move arch-specific prctls out of core code Dave Martin
2018-05-14 17:14 ` Dave Martin
2018-05-14 17:14 ` [RFC PATCH 10/11] prctl: Remove redundant task argument from PR_{SET,GET}_UNALIGN backends Dave Martin
2018-05-14 17:14 ` Dave Martin
2018-05-14 17:14 ` [RFC PATCH 11/11] prctl: Refactor PR_{SET,GET}_UNALIGN to reduce boilerplate Dave Martin
2018-05-14 17:14 ` Dave Martin
2018-05-14 18:28 ` [RFC PATCH 00/11] prctl: Modernise wiring for optional prctl() calls Kees Cook
2018-05-14 18:28 ` Kees Cook
2018-05-15 13:30 ` Dave Martin
2018-05-15 13:30 ` Dave Martin
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=1526318067-4964-9-git-send-email-Dave.Martin@arm.com \
--to=dave.martin@arm.com \
--cc=fenghua.yu@intel.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.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;
as well as URLs for NNTP newsgroup(s).