All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Oleg Nesterov <oleg@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] ptrace: Remove redudant check of #ifdef PTRACE_SINGLESTEP
Date: Wed,  6 Apr 2022 18:29:39 +0800	[thread overview]
Message-ID: <1649240981-11024-2-git-send-email-yangtiezhu@loongson.cn> (raw)
In-Reply-To: <1649240981-11024-1-git-send-email-yangtiezhu@loongson.cn>

PTRACE_SINGLESTEP is always defined as 9 in include/uapi/linux/ptrace.h,
remove redudant check of #ifdef PTRACE_SINGLESTEP.

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 kernel/ptrace.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index ccc4b46..49c29ba 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -829,11 +829,7 @@ static long ptrace_get_rseq_configuration(struct task_struct *task,
 }
 #endif
 
-#ifdef PTRACE_SINGLESTEP
 #define is_singlestep(request)		((request) == PTRACE_SINGLESTEP)
-#else
-#define is_singlestep(request)		0
-#endif
 
 #ifdef PTRACE_SINGLEBLOCK
 #define is_singleblock(request)		((request) == PTRACE_SINGLEBLOCK)
@@ -1221,9 +1217,7 @@ int ptrace_request(struct task_struct *child, long request,
 	}
 #endif
 
-#ifdef PTRACE_SINGLESTEP
 	case PTRACE_SINGLESTEP:
-#endif
 #ifdef PTRACE_SINGLEBLOCK
 	case PTRACE_SINGLEBLOCK:
 #endif
-- 
2.1.0


  reply	other threads:[~2022-04-06 14:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 10:29 [PATCH 0/3] ptrace: do some cleanup Tiezhu Yang
2022-04-06 10:29 ` Tiezhu Yang [this message]
2022-04-06 10:29 ` [PATCH 2/3] ptrace: Fix wrong comment of PT_DTRACE Tiezhu Yang
2022-04-06 10:29 ` [PATCH 3/3] MAINTAINERS: Remove redundant file of PTRACE SUPPORT entry Tiezhu Yang

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=1649240981-11024-2-git-send-email-yangtiezhu@loongson.cn \
    --to=yangtiezhu@loongson.cn \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.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.