All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Weinberger <richard@nod.at>
To: linux-kernel@vger.kernel.org
Cc: linux-arch@vger.kernel.org, viro@zeniv.linux.org.uk,
	vgupta@synopsys.com, catalin.marinas@arm.com,
	will.deacon@arm.com, hskinnemoen@gmail.com, egtvedt@samfundet.no,
	vapier@gentoo.org, msalter@redhat.com, a-jacquiot@ti.com,
	starvik@axis.com, jesper.nilsson@axis.com, dhowells@redhat.com,
	rkuo@codeaurora.org, tony.luck@intel.com, fenghua.yu@intel.com,
	takata@linux-m32r.org, geert@linux-m68k.org,
	james.hogan@imgtec.com, monstr@monstr.eu,
	yasutake.koichi@jp.panasonic.com, ralf@linux-mips.org,
	jonas@southpole.se, jejb@parisc-linux.org, deller@gmx.de,
	benh@kernel.crashing.org, paulus@samba.org,
	schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com,
	liqin.linux@gmail.com, lennox.wu@gmail.com, cmetcalf@tilera.com,
	gxt@mprc.pku.edu.cn, linux-xtensa@linux-xtensa.org,
	akpm@linux-foundation.org, oleg@redhat.com, tj@kernel.org,
	hch@infradead.org, Richard Weinberger <richard@nod.at>
Subject: [PATCH 36/44] microblaze: Use translate_signal()
Date: Mon,  3 Mar 2014 01:00:36 +0100	[thread overview]
Message-ID: <1393804844-8008-2-git-send-email-richard@nod.at> (raw)
In-Reply-To: <1393804844-8008-1-git-send-email-richard@nod.at>

Use the common helper instead of it's own open coded variant.

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 arch/microblaze/kernel/signal.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c
index a34da52..7bde506 100644
--- a/arch/microblaze/kernel/signal.c
+++ b/arch/microblaze/kernel/signal.c
@@ -28,7 +28,6 @@
 #include <linux/ptrace.h>
 #include <linux/unistd.h>
 #include <linux/stddef.h>
-#include <linux/personality.h>
 #include <linux/percpu.h>
 #include <linux/linkage.h>
 #include <linux/tracehook.h>
@@ -160,8 +159,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
 			  struct pt_regs *regs)
 {
 	struct rt_sigframe __user *frame;
-	int err = 0, sig = ksig->sig;
-	int signal;
+	int err = 0, signal;
 	unsigned long address = 0;
 #ifdef CONFIG_MMU
 	pmd_t *pmdp;
@@ -173,11 +171,7 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
 	if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
 		return -EFAULT;
 
-	signal = current_thread_info()->exec_domain
-		&& current_thread_info()->exec_domain->signal_invmap
-		&& sig < 32
-		? current_thread_info()->exec_domain->signal_invmap[sig]
-		: sig;
+	signal = translate_signal(ksig->sig);
 
 	if (ksig->ka.sa.sa_flags & SA_SIGINFO)
 		err |= copy_siginfo_to_user(&frame->info, &ksig->info);
-- 
1.8.4.2


  reply	other threads:[~2014-03-03  0:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03  0:00 [PATCH 35/44] m68k: Use translate_signal() Richard Weinberger
2014-03-03  0:00 ` Richard Weinberger [this message]
2014-03-03  0:00 ` [PATCH 37/44] mn10300: " Richard Weinberger
2014-03-03  0:00 ` [PATCH 38/44] s390: " Richard Weinberger
2014-03-03  0:00 ` [PATCH 39/44] sh: " Richard Weinberger
2014-03-03  0:00 ` [PATCH 40/44] tile: " Richard Weinberger
2014-03-03  0:00 ` [PATCH 41/44] unicore32: " Richard Weinberger
2014-03-03  0:00 ` [PATCH 42/44] x86: " Richard Weinberger
2014-03-03  0:00 ` [PATCH 43/44] um/x86: " Richard Weinberger
2014-03-03  0:00 ` [PATCH 44/44] xtensa: " Richard Weinberger

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=1393804844-8008-2-git-send-email-richard@nod.at \
    --to=richard@nod.at \
    --cc=a-jacquiot@ti.com \
    --cc=akpm@linux-foundation.org \
    --cc=benh@kernel.crashing.org \
    --cc=catalin.marinas@arm.com \
    --cc=cmetcalf@tilera.com \
    --cc=deller@gmx.de \
    --cc=dhowells@redhat.com \
    --cc=egtvedt@samfundet.no \
    --cc=fenghua.yu@intel.com \
    --cc=geert@linux-m68k.org \
    --cc=gxt@mprc.pku.edu.cn \
    --cc=hch@infradead.org \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hskinnemoen@gmail.com \
    --cc=james.hogan@imgtec.com \
    --cc=jejb@parisc-linux.org \
    --cc=jesper.nilsson@axis.com \
    --cc=jonas@southpole.se \
    --cc=lennox.wu@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xtensa@linux-xtensa.org \
    --cc=liqin.linux@gmail.com \
    --cc=monstr@monstr.eu \
    --cc=msalter@redhat.com \
    --cc=oleg@redhat.com \
    --cc=paulus@samba.org \
    --cc=ralf@linux-mips.org \
    --cc=rkuo@codeaurora.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=starvik@axis.com \
    --cc=takata@linux-m32r.org \
    --cc=tj@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=vapier@gentoo.org \
    --cc=vgupta@synopsys.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=will.deacon@arm.com \
    --cc=yasutake.koichi@jp.panasonic.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 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.