Re: [PATCH] arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG.

2021-04-14 Thread Catalin Marinas
On Tue, 30 Mar 2021 04:57:50 -0700, zhouchuangao wrote: > It can be optimized at compile time. Applied to arm64 (for-next/misc), it saves one line ;). Thanks! [1/1] arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG. https://git.kernel.org/arm64/c/839157876f97 --

Re: [PATCH] arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG.

2021-04-01 Thread Masami Hiramatsu
On Tue, 30 Mar 2021 04:57:50 -0700 zhouchuangao wrote: > It can be optimized at compile time. > Anyway, this seems to make the code simpler. Reviewed-by: Masami Hiramatsu Thanks! > Signed-off-by: zhouchuangao > --- > arch/arm64/kernel/probes/kprobes.c | 3 +-- > 1 file changed, 1

Re:Re: [PATCH] arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG.

2021-04-01 Thread 周传高
>On Tue, Mar 30, 2021 at 04:57:50AM -0700, zhouchuangao wrote:>> It can be >optimized at compile time. > >Hmm, I don't see it (and I also don't understand why we care). Do you have >numbers showing that this is worthwhile? > #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while

Re: [PATCH] arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG.

2021-03-30 Thread Will Deacon
On Tue, Mar 30, 2021 at 04:57:50AM -0700, zhouchuangao wrote: > It can be optimized at compile time. Hmm, I don't see it (and I also don't understand why we care). Do you have numbers showing that this is worthwhile? Will

[PATCH] arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG.

2021-03-30 Thread zhouchuangao
It can be optimized at compile time. Signed-off-by: zhouchuangao --- arch/arm64/kernel/probes/kprobes.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/arm64/kernel/probes/kprobes.c b/arch/arm64/kernel/probes/kprobes.c index 66aac28..ecf0f61 100644 ---