From patchwork Wed Apr 23 13:11:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 28882 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f198.google.com (mail-ig0-f198.google.com [209.85.213.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5591020534 for ; Wed, 23 Apr 2014 13:13:17 +0000 (UTC) Received: by mail-ig0-f198.google.com with SMTP id h3sf3262736igd.5 for ; Wed, 23 Apr 2014 06:13:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=GVsl9N1OwpKBYULfOmdJZzNO0yV1D7pQliUf5knd4z0=; b=TDnQDGr4A2rix9A+Ab4yPE2ipNUSQd8WTdN2ZeTV1JHUeZ5R9oSk+0WpeC9xtY8Ma4 3+NPe0T+Uqmn5yRWVT1fWN9nDw/ZrHG6xNnKog3EPw2eVokGzgrEsIHskLcK4Vo++Qe9 Ggg+LC4Y+mJq6u/voMWgMa6aB7J5nY9eIrmRYWqXgBTTS989J2JLJTXCUSnW/hxxd5Bh 5jPDrffjlHQnaeYEyIv9XUSdTCmyuo0NbMWVFm+ehyQa4eNwfws21nv9wwZpB0SNeQV9 Y6DdQ2FmKk5gBbEcn4QITFFXT3b56EF5pWTkHFuUurklP1uO2fogcLp17QranUQWNWmD 1XcQ== X-Gm-Message-State: ALoCoQmAu2Pk0IWQb2cVfou89HWqo2De6WLHrQjN1l7UqWPMJd0PGuPIZiZKWqNo8PM+X0OZZ+zF X-Received: by 10.182.45.131 with SMTP id n3mr26446563obm.20.1398258796725; Wed, 23 Apr 2014 06:13:16 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.20.138 with SMTP id 10ls555406qgj.92.gmail; Wed, 23 Apr 2014 06:13:16 -0700 (PDT) X-Received: by 10.220.188.10 with SMTP id cy10mr164426vcb.36.1398258796597; Wed, 23 Apr 2014 06:13:16 -0700 (PDT) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id sc7si157291vdc.103.2014.04.23.06.13.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Apr 2014 06:13:16 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.182; Received: by mail-vc0-f182.google.com with SMTP id ib6so1133823vcb.27 for ; Wed, 23 Apr 2014 06:13:16 -0700 (PDT) X-Received: by 10.52.108.164 with SMTP id hl4mr12458055vdb.25.1398258796463; Wed, 23 Apr 2014 06:13:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp102946vcb; Wed, 23 Apr 2014 06:13:15 -0700 (PDT) X-Received: by 10.140.97.130 with SMTP id m2mr12500966qge.23.1398258794646; Wed, 23 Apr 2014 06:13:14 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id a32si422603qgf.135.2014.04.23.06.13.14 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 23 Apr 2014 06:13:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:60837 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcwzC-0002sW-5X for patch@linaro.org; Wed, 23 Apr 2014 09:13:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WcwyE-0001kk-DG for qemu-devel@nongnu.org; Wed, 23 Apr 2014 09:12:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wcwy8-0001Ip-2R for qemu-devel@nongnu.org; Wed, 23 Apr 2014 09:12:14 -0400 Received: from afflict.kos.to ([92.243.29.197]:42796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wcwy7-0001I3-Mn for qemu-devel@nongnu.org; Wed, 23 Apr 2014 09:12:08 -0400 Received: from localhost.localdomain (afflict [92.243.29.197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id CD653264D1 for ; Wed, 23 Apr 2014 15:12:05 +0200 (CEST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Wed, 23 Apr 2014 16:11:54 +0300 Message-Id: <748467b6cddce82822f2ac4cf2b36762c31f83f4.1398257165.git.riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 92.243.29.197 Subject: [Qemu-devel] [PATCH 03/13] signal.c: remove return value from copy_siginfo_to_user X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Riku Voipio Since copy_siginfo_to_user always returns 0, make it void and remove any checks for return value from calling functions. Signed-off-by: Riku Voipio --- linux-user/signal.c | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index f261383..4da9c26 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -721,11 +721,10 @@ int do_sigaction(int sig, const struct target_sigaction *act, return ret; } -static inline int copy_siginfo_to_user(target_siginfo_t *tinfo, +static inline void copy_siginfo_to_user(target_siginfo_t *tinfo, const target_siginfo_t *info) { tswap_siginfo(tinfo, info); - return 0; } static inline int current_exec_domain_sig(int sig) @@ -985,9 +984,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, __put_user(addr, &frame->pinfo); addr = frame_addr + offsetof(struct rt_sigframe, uc); __put_user(addr, &frame->puc); - err |= copy_siginfo_to_user(&frame->info, info); - if (err) - goto give_sigsegv; + copy_siginfo_to_user(&frame->info, info); /* Create the ucontext. */ __put_user(0, &frame->uc.tuc_flags); @@ -1362,9 +1359,7 @@ static void target_setup_frame(int usig, struct target_sigaction *ka, env->pc = ka->_sa_handler; env->xregs[30] = return_addr; if (info) { - if (copy_siginfo_to_user(&frame->info, info)) { - goto give_sigsegv; - } + copy_siginfo_to_user(&frame->info, info); env->xregs[1] = frame_addr + offsetof(struct target_rt_sigframe, info); env->xregs[2] = frame_addr + offsetof(struct target_rt_sigframe, uc); } @@ -3362,7 +3357,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, signal = current_exec_domain_sig(sig); - err |= copy_siginfo_to_user(&frame->info, info); + copy_siginfo_to_user(&frame->info, info); /* Create the ucontext. */ __put_user(0, &frame->uc.tuc_flags); @@ -4042,10 +4037,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, __put_user(uc_addr, &frame->puc); if (ka->sa_flags & SA_SIGINFO) { - err |= copy_siginfo_to_user(&frame->info, info); - } - if (err) { - goto give_sigsegv; + copy_siginfo_to_user(&frame->info, info); } /*err |= __clear_user(&frame->uc, offsetof(struct ucontext, uc_mcontext));*/ @@ -4305,9 +4297,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, } qemu_log("%s: 1\n", __FUNCTION__); - if (copy_siginfo_to_user(&frame->info, info)) { - goto give_sigsegv; - } + copy_siginfo_to_user(&frame->info, info); /* Create the ucontext. */ __put_user(0, &frame->uc.tuc_flags); @@ -4881,7 +4871,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, signal = current_exec_domain_sig(sig); - err |= copy_siginfo_to_user(&rt_sf->info, info); + copy_siginfo_to_user(&rt_sf->info, info); __put_user(0, &rt_sf->uc.tuc_flags); __put_user(0, &rt_sf->uc.tuc_link); @@ -5300,7 +5290,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, uc_addr = frame_addr + offsetof(struct target_rt_sigframe, uc); __put_user(uc_addr, &frame->puc); - err |= copy_siginfo_to_user(&frame->info, info); + copy_siginfo_to_user(&frame->info, info); /* Create the ucontext */ @@ -5586,7 +5576,7 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, goto give_sigsegv; } - err |= copy_siginfo_to_user(&frame->info, info); + copy_siginfo_to_user(&frame->info, info); __put_user(0, &frame->uc.tuc_flags); __put_user(0, &frame->uc.tuc_link);