All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/6] avr32: get rid of useless args in signal.c before other work there
@ 2010-09-28  2:57 Al Viro
  2010-11-01  7:58 ` Hans-Christian Egtvedt
  0 siblings, 1 reply; 5+ messages in thread
From: Al Viro @ 2010-09-28  2:57 UTC (permalink / raw)
  To: hans-christian.egtvedt; +Cc: torvalds, linux-kernel, linux-arch


Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 arch/avr32/kernel/signal.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c
index 64f886f..8c481fb 100644
--- a/arch/avr32/kernel/signal.c
+++ b/arch/avr32/kernel/signal.c
@@ -224,7 +224,7 @@ static inline void setup_syscall_restart(struct pt_regs *regs)
 
 static inline void
 handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
-	      sigset_t *oldset, struct pt_regs *regs, int syscall)
+	      sigset_t *oldset, struct pt_regs *regs)
 {
 	int ret;
 
@@ -261,11 +261,12 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
  * doesn't want to handle. Thus you cannot kill init even with a
  * SIGKILL even by mistake.
  */
-int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall)
+static void do_signal(struct pt_regs *regs, int syscall)
 {
 	siginfo_t info;
 	int signr;
 	struct k_sigaction ka;
+	sigset_t *oldset;
 
 	/*
 	 * We want the common case to go fast, which is why we may in
@@ -273,7 +274,7 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall)
 	 * without doing anything if so.
 	 */
 	if (!user_mode(regs))
-		return 0;
+		return;
 
 	if (test_thread_flag(TIF_RESTORE_SIGMASK))
 		oldset = &current->saved_sigmask;
@@ -307,11 +308,10 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall)
 			clear_thread_flag(TIF_RESTORE_SIGMASK);
 			sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
 		}
-		return 0;
+		return;
 	}
 
-	handle_signal(signr, &ka, &info, oldset, regs, syscall);
-	return 1;
+	handle_signal(signr, &ka, &info, oldset, regs);
 }
 
 asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti)
@@ -322,7 +322,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti)
 		syscall = 1;
 
 	if (ti->flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
-		do_signal(regs, &current->blocked, syscall);
+		do_signal(regs, syscall);
 
 	if (ti->flags & _TIF_NOTIFY_RESUME) {
 		clear_thread_flag(TIF_NOTIFY_RESUME);
-- 
1.5.6.5



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/6] avr32: get rid of useless args in signal.c before other work there
  2010-09-28  2:57 [PATCH 2/6] avr32: get rid of useless args in signal.c before other work there Al Viro
@ 2010-11-01  7:58 ` Hans-Christian Egtvedt
  2010-11-01  8:02   ` Al Viro
  0 siblings, 1 reply; 5+ messages in thread
From: Hans-Christian Egtvedt @ 2010-11-01  7:58 UTC (permalink / raw)
  To: Al Viro; +Cc: torvalds, linux-kernel, linux-arch

On Tue, 2010-09-28 at 03:57 +0100, Al Viro wrote: 
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

<snipp>

> @@ -261,11 +261,12 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
>   * doesn't want to handle. Thus you cannot kill init even with a
>   * SIGKILL even by mistake.
>   */
> -int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall)
> +static void do_signal(struct pt_regs *regs, int syscall)
>  {
>  	siginfo_t info;
>  	int signr;
>  	struct k_sigaction ka;
> +	sigset_t *oldset;

Should be initialized as it is checked in the else if block further
below.

<snipp>

-- 
Hans-Christian Egtvedt


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/6] avr32: get rid of useless args in signal.c before other work there
  2010-11-01  7:58 ` Hans-Christian Egtvedt
@ 2010-11-01  8:02   ` Al Viro
  2010-11-01  8:08     ` Hans-Christian Egtvedt
  0 siblings, 1 reply; 5+ messages in thread
From: Al Viro @ 2010-11-01  8:02 UTC (permalink / raw)
  To: Hans-Christian Egtvedt; +Cc: Al Viro, torvalds, linux-kernel, linux-arch

On Mon, Nov 01, 2010 at 08:58:29AM +0100, Hans-Christian Egtvedt wrote:
> On Tue, 2010-09-28 at 03:57 +0100, Al Viro wrote: 
> > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> 
> <snipp>
> 
> > @@ -261,11 +261,12 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
> >   * doesn't want to handle. Thus you cannot kill init even with a
> >   * SIGKILL even by mistake.
> >   */
> > -int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall)
> > +static void do_signal(struct pt_regs *regs, int syscall)
> >  {
> >  	siginfo_t info;
> >  	int signr;
> >  	struct k_sigaction ka;
> > +	sigset_t *oldset;
> 
> Should be initialized as it is checked in the else if block further
> below.

That else if should be simply else...

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/6] avr32: get rid of useless args in signal.c before other work there
  2010-11-01  8:02   ` Al Viro
@ 2010-11-01  8:08     ` Hans-Christian Egtvedt
  0 siblings, 0 replies; 5+ messages in thread
From: Hans-Christian Egtvedt @ 2010-11-01  8:08 UTC (permalink / raw)
  To: Al Viro; +Cc: Al Viro, torvalds, linux-kernel, linux-arch

On Mon, 2010-11-01 at 08:02 +0000, Al Viro wrote: 
> On Mon, Nov 01, 2010 at 08:58:29AM +0100, Hans-Christian Egtvedt wrote:
> > On Tue, 2010-09-28 at 03:57 +0100, Al Viro wrote: 
> > > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> > > @@ -261,11 +261,12 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
> > >   * doesn't want to handle. Thus you cannot kill init even with a
> > >   * SIGKILL even by mistake.
> > >   */
> > > -int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall)
> > > +static void do_signal(struct pt_regs *regs, int syscall)
> > >  {
> > >  	siginfo_t info;
> > >  	int signr;
> > >  	struct k_sigaction ka;
> > > +	sigset_t *oldset;
> > 
> > Should be initialized as it is checked in the else if block further
> > below.
> 
> That else if should be simply else...

Ah, that made a lot more sense. I'm still on my first cup of coffee
brushing dust of your series.

-- 
Hans-Christian Egtvedt


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/6] avr32: get rid of useless args in signal.c before other work there
@ 2010-12-15 10:39 Al Viro
  0 siblings, 0 replies; 5+ messages in thread
From: Al Viro @ 2010-12-15 10:39 UTC (permalink / raw)
  To: hans-christian.egtvedt; +Cc: linux-kernel


Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 arch/avr32/kernel/signal.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/avr32/kernel/signal.c b/arch/avr32/kernel/signal.c
index 64f886f..df7d75c 100644
--- a/arch/avr32/kernel/signal.c
+++ b/arch/avr32/kernel/signal.c
@@ -224,7 +224,7 @@ static inline void setup_syscall_restart(struct pt_regs *regs)
 
 static inline void
 handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
-	      sigset_t *oldset, struct pt_regs *regs, int syscall)
+	      sigset_t *oldset, struct pt_regs *regs)
 {
 	int ret;
 
@@ -261,11 +261,12 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, siginfo_t *info,
  * doesn't want to handle. Thus you cannot kill init even with a
  * SIGKILL even by mistake.
  */
-int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall)
+static void do_signal(struct pt_regs *regs, int syscall)
 {
 	siginfo_t info;
 	int signr;
 	struct k_sigaction ka;
+	sigset_t *oldset;
 
 	/*
 	 * We want the common case to go fast, which is why we may in
@@ -273,11 +274,11 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall)
 	 * without doing anything if so.
 	 */
 	if (!user_mode(regs))
-		return 0;
+		return;
 
 	if (test_thread_flag(TIF_RESTORE_SIGMASK))
 		oldset = &current->saved_sigmask;
-	else if (!oldset)
+	else
 		oldset = &current->blocked;
 
 	signr = get_signal_to_deliver(&info, &ka, regs, NULL);
@@ -307,11 +308,10 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset, int syscall)
 			clear_thread_flag(TIF_RESTORE_SIGMASK);
 			sigprocmask(SIG_SETMASK, &current->saved_sigmask, NULL);
 		}
-		return 0;
+		return;
 	}
 
-	handle_signal(signr, &ka, &info, oldset, regs, syscall);
-	return 1;
+	handle_signal(signr, &ka, &info, oldset, regs);
 }
 
 asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti)
@@ -322,7 +322,7 @@ asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti)
 		syscall = 1;
 
 	if (ti->flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
-		do_signal(regs, &current->blocked, syscall);
+		do_signal(regs, syscall);
 
 	if (ti->flags & _TIF_NOTIFY_RESUME) {
 		clear_thread_flag(TIF_NOTIFY_RESUME);
-- 
1.5.6.5



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-12-15 10:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-28  2:57 [PATCH 2/6] avr32: get rid of useless args in signal.c before other work there Al Viro
2010-11-01  7:58 ` Hans-Christian Egtvedt
2010-11-01  8:02   ` Al Viro
2010-11-01  8:08     ` Hans-Christian Egtvedt
2010-12-15 10:39 Al Viro

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.