diff mbox series

[2/2] linxu-user: Change return type of queue_signal to void

Message ID 20220116204423.16133-3-imp@bsdimp.com (mailing list archive)
State New, archived
Headers show
Series linux-user: Two minor patches | expand

Commit Message

Warner Losh Jan. 16, 2022, 8:44 p.m. UTC
queue_signal always returns 1, and nobody checks it. This is better
expressed as a void function return type.

Signed-off-by: Warner Losh <imp@bsdimp.com>
---
 linux-user/signal-common.h | 4 ++--
 linux-user/signal.c        | 5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

Comments

Peter Maydell Jan. 16, 2022, 9:44 p.m. UTC | #1
On Sun, 16 Jan 2022 at 20:44, Warner Losh <imp@bsdimp.com> wrote:
>
> queue_signal always returns 1, and nobody checks it. This is better
> expressed as a void function return type.
>
> Signed-off-by: Warner Losh <imp@bsdimp.com>
> ---
>  linux-user/signal-common.h | 4 ++--
>  linux-user/signal.c        | 5 ++---
>  2 files changed, 4 insertions(+), 5 deletions(-

This one's a dup of patch 3 from my series from Friday:
https://patchew.org/QEMU/20220114153732.3767229-1-peter.maydell@linaro.org/20220114153732.3767229-4-peter.maydell@linaro.org/


-- PMM
diff mbox series

Patch

diff --git a/linux-user/signal-common.h b/linux-user/signal-common.h
index 42aa479080b..2113165a758 100644
--- a/linux-user/signal-common.h
+++ b/linux-user/signal-common.h
@@ -59,8 +59,8 @@  void setup_rt_frame(int sig, struct target_sigaction *ka,
 
 void process_pending_signals(CPUArchState *cpu_env);
 void signal_init(void);
-int queue_signal(CPUArchState *env, int sig, int si_type,
-                 target_siginfo_t *info);
+void queue_signal(CPUArchState *env, int sig, int si_type,
+                  target_siginfo_t *info);
 void host_to_target_siginfo(target_siginfo_t *tinfo, const siginfo_t *info);
 void target_to_host_siginfo(siginfo_t *info, const target_siginfo_t *tinfo);
 int target_to_host_signal(int sig);
diff --git a/linux-user/signal.c b/linux-user/signal.c
index f813b4f18e4..eddc95e87df 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -780,8 +780,8 @@  static void QEMU_NORETURN dump_core_and_abort(int target_sig)
 
 /* queue a signal so that it will be send to the virtual CPU as soon
    as possible */
-int queue_signal(CPUArchState *env, int sig, int si_type,
-                 target_siginfo_t *info)
+void queue_signal(CPUArchState *env, int sig, int si_type,
+                  target_siginfo_t *info)
 {
     CPUState *cpu = env_cpu(env);
     TaskState *ts = cpu->opaque;
@@ -794,7 +794,6 @@  int queue_signal(CPUArchState *env, int sig, int si_type,
     ts->sync_signal.pending = sig;
     /* signal that a new signal is pending */
     qatomic_set(&ts->signal_pending, 1);
-    return 1; /* indicates that the signal was queued */
 }