From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9FCD71F4191 for ; Mon, 8 Sep 2025 21:31:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757367092; cv=none; b=BI2Ok9dstPbGdouUpVGxnD7FKClPHor1gol0z2bjL/RE1sQt/idTQeoBuHn+Ns9Li8htoCyVz17Xjjx8+A5M1bdfgVfdjmLJf+q9dZrUVQk0BbWam1iyNheufp6YTt5kh1ueq3c8HDQkog5SK3OheeEHGgE3oK0qx3E652Yan18= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757367092; c=relaxed/simple; bh=mLGmoy+8sQC4ByUNI23jaaR+os/SUOAVMkc9Uv/+ixc=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=cyvv77uaQu8fNzWDJqvDG388dk85Re/CB9kisMudrUM35DPdmtFXVd9Rvf+KH47nBuFxVM/ott5iknHi7AWKP4TGahzduxwkf1LrHt95YJ4ysPXtmyKDg46gn1ff1ZHvSbISBnk6nA5f9nyoiwv7ycKKtKYw8/Nqh0XtnOjMhaQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=psRT5mae; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=8ELqBJvp; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="psRT5mae"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="8ELqBJvp" Message-ID: <20250908212925.389031537@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1757367088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=B7vLQ2oonr5UpS/A0J8VoSxOKB10lfCLowOJpVJzgfY=; b=psRT5maeVWDpNfm9x6sQWjh+mZiFFWoStwHHvCIUufq2e84flkS+zhFCCju3TXcUTBBJAz 0IPhvut+3Sl62q/4DZeIXX619BNPa02UJl3i4X999uJt4dBs8OmWLbabmmOwUMZLzRkoUc uLCUIgfEPoas+1hCR5oUF4+OzfFaDdOEm23pz4ifT3B8eJU0MvpcrBx/pnW2nSCmVHhKOZ n6DMdxetBtn3Dq/lfjUHvO/INdGTolJ93+4s+YKRPRUXMJjw07kLBLvb8mgJkzckZlXZ96 ezxWD0FLx53LW8jhFlr2iiNJflaatvCyHv6OzbkqIi0T/kHMjhRiUDcN/cqcWA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1757367088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=B7vLQ2oonr5UpS/A0J8VoSxOKB10lfCLowOJpVJzgfY=; b=8ELqBJvp9YmD8JMPWeFXYXJ1QfIrOdZ5woL3ZCeCGN7vOnEYYzCjHuXaKRTsRVdhS6NTwM Lr7CaodwHNCJnFDA== From: Thomas Gleixner To: LKML Cc: Michael Jeanson , Jens Axboe , Mathieu Desnoyers , Peter Zijlstra , "Paul E. McKenney" , Boqun Feng , Paolo Bonzini , Sean Christopherson , Wei Liu , Dexuan Cui , x86@kernel.org, Arnd Bergmann , Heiko Carstens , Christian Borntraeger , Sven Schnelle , Huacai Chen , Paul Walmsley , Palmer Dabbelt Subject: [patch V4 02/36] rseq: Condense the inline stubs References: <20250908212737.353775467@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Mon, 8 Sep 2025 23:31:27 +0200 (CEST) From: Thomas Gleixner Scrolling over tons of pointless { } lines to find the actual code is annoying at best. Signed-off-by: Thomas Gleixner Reviewed-by: Mathieu Desnoyers Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Boqun Feng --- include/linux/rseq.h | 47 ++++++++++++----------------------------------- 1 file changed, 12 insertions(+), 35 deletions(-) --- --- a/include/linux/rseq.h +++ b/include/linux/rseq.h @@ -101,44 +101,21 @@ static inline void rseq_execve(struct ta t->rseq_event_mask = 0; } -#else - -static inline void rseq_set_notify_resume(struct task_struct *t) -{ -} -static inline void rseq_handle_notify_resume(struct ksignal *ksig, - struct pt_regs *regs) -{ -} -static inline void rseq_signal_deliver(struct ksignal *ksig, - struct pt_regs *regs) -{ -} -static inline void rseq_preempt(struct task_struct *t) -{ -} -static inline void rseq_migrate(struct task_struct *t) -{ -} -static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) -{ -} -static inline void rseq_execve(struct task_struct *t) -{ -} +#else /* CONFIG_RSEQ */ +static inline void rseq_set_notify_resume(struct task_struct *t) { } +static inline void rseq_handle_notify_resume(struct ksignal *ksig, struct pt_regs *regs) { } +static inline void rseq_signal_deliver(struct ksignal *ksig, struct pt_regs *regs) { } +static inline void rseq_preempt(struct task_struct *t) { } +static inline void rseq_migrate(struct task_struct *t) { } +static inline void rseq_fork(struct task_struct *t, unsigned long clone_flags) { } +static inline void rseq_execve(struct task_struct *t) { } static inline void rseq_exit_to_user_mode(void) { } -#endif +#endif /* !CONFIG_RSEQ */ #ifdef CONFIG_DEBUG_RSEQ - void rseq_syscall(struct pt_regs *regs); - -#else - -static inline void rseq_syscall(struct pt_regs *regs) -{ -} - -#endif +#else /* CONFIG_DEBUG_RSEQ */ +static inline void rseq_syscall(struct pt_regs *regs) { } +#endif /* !CONFIG_DEBUG_RSEQ */ #endif /* _LINUX_RSEQ_H */