Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ptrace: remove redudant check of #ifdef PTRACE_SINGLESTEP

Patch series "ptrace: do some cleanup".


This patch (of 3):

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

Link: https://lkml.kernel.org/r/1649240981-11024-2-git-send-email-yangtiezhu@loongson.cn
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Tiezhu Yang and committed by
akpm
f26b2afd 183c3237

-6
-6
kernel/ptrace.c
··· 829 829 } 830 830 #endif 831 831 832 - #ifdef PTRACE_SINGLESTEP 833 832 #define is_singlestep(request) ((request) == PTRACE_SINGLESTEP) 834 - #else 835 - #define is_singlestep(request) 0 836 - #endif 837 833 838 834 #ifdef PTRACE_SINGLEBLOCK 839 835 #define is_singleblock(request) ((request) == PTRACE_SINGLEBLOCK) ··· 1217 1221 } 1218 1222 #endif 1219 1223 1220 - #ifdef PTRACE_SINGLESTEP 1221 1224 case PTRACE_SINGLESTEP: 1222 - #endif 1223 1225 #ifdef PTRACE_SINGLEBLOCK 1224 1226 case PTRACE_SINGLEBLOCK: 1225 1227 #endif