mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Hirokazu Takata <takata@linux-m32r.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-m32r@ml.linux-m32r.org, linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Al Viro <viro@zeniv.linux.org.uk>, Christoph Hellwig <hch@lst.de>
Subject: [PATCH 3/6] m32r: Fix 'fix breakage from "m32r: use generic ptrace_resume code"' fallout
Date: Fri, 13 Jul 2012 23:20:24 +0200	[thread overview]
Message-ID: <1342214427-17607-3-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1342214427-17607-1-git-send-email-geert@linux-m68k.org>

commit acdc0d5ef9dd74534fe8df77a2056fa1d911abe5 ('m32r: fix breakage from
"m32r: use generic ptrace_resume code"') tried to fix commit
e34112e3966fc466ced2698e6c196bb50b1ee20e ("m32r: use generic ptrace_resume
code") by returning values in a function returning void, causing:

arch/m32r/kernel/ptrace.c: In function 'user_enable_single_step':
arch/m32r/kernel/ptrace.c:594:3: warning: 'return' with a value, in function returning void [enabled by default]
arch/m32r/kernel/ptrace.c:598:3: warning: 'return' with a value, in function returning void [enabled by default]
arch/m32r/kernel/ptrace.c:601:3: warning: 'return' with a value, in function returning void [enabled by default]
arch/m32r/kernel/ptrace.c:604:2: warning: 'return' with a value, in function returning void [enabled by default]

Remove the unneeded return values.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
--
Is this the correct fix? There's no way to propagate failures
---
 arch/m32r/kernel/ptrace.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c
index 4c03361..51f5e9a 100644
--- a/arch/m32r/kernel/ptrace.c
+++ b/arch/m32r/kernel/ptrace.c
@@ -591,17 +591,16 @@ void user_enable_single_step(struct task_struct *child)
 
 	if (access_process_vm(child, pc&~3, &insn, sizeof(insn), 0)
 	    != sizeof(insn))
-		return -EIO;
+		return;
 
 	compute_next_pc(insn, pc, &next_pc, child);
 	if (next_pc & 0x80000000)
-		return -EIO;
+		return;
 
 	if (embed_debug_trap(child, next_pc))
-		return -EIO;
+		return;
 
 	invalidate_cache();
-	return 0;
 }
 
 void user_disable_single_step(struct task_struct *child)
-- 
1.7.0.4


  parent reply	other threads:[~2012-07-13 21:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-13 21:20 [PATCH 1/6] m32r: Remove duplicate definition of PTRACE_O_TRACESYSGOOD Geert Uytterhoeven
2012-07-13 21:20 ` [PATCH 2/6] m32r: Fix pull clearing RESTORE_SIGMASK into block_sigmask() fallout Geert Uytterhoeven
2012-07-13 21:20 ` Geert Uytterhoeven [this message]
2012-07-13 21:20 ` [PATCH 4/6] m32r: Consistently use "suffix-$(...)" Geert Uytterhoeven
2012-07-13 21:20 ` [PATCH 5/6] m32r: Add memcpy() for CONFIG_KERNEL_GZIP=y Geert Uytterhoeven
2012-07-13 21:20 ` [PATCH 6/6] m32r: Make memset() global for CONFIG_KERNEL_BZIP2=y Geert Uytterhoeven

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=1342214427-17607-3-git-send-email-geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=akpm@linux-foundation.org \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m32r@ml.linux-m32r.org \
    --cc=takata@linux-m32r.org \
    --cc=viro@zeniv.linux.org.uk \
    /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

all inboxes | Powered by JetHome®