Re: [PATCH] ftrace: Make ftrace_regs abstract from direct use
From: Google
Date: Tue Oct 08 2024 - 18:51:48 EST
Hi Steve,
> diff --git a/include/asm-generic/ftrace.h b/include/asm-generic/ftrace.h
> index 3a23028d69d2..ba7b7d6e55d6 100644
> --- a/include/asm-generic/ftrace.h
> +++ b/include/asm-generic/ftrace.h
> @@ -10,4 +10,17 @@
> * common definitions are already in linux/ftrace.h.
> */
>
> +#ifndef CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS
> +struct __arch_ftrace_regs {
> + struct pt_regs regs;
> +};
> +
> +#define arch_ftrace_get_regs(fregs) \
> + ({ struct __arch_fregs_regs *__f = (struct __arch_ftrace_regs *)(fregs); \
> + &__f->regs; \
> + })
> +
> +struct ftrace_regs;
> +#define arch_ftrace_regs(fregs) ((struct __arch_ftrace_regs *)(fregs))
> +
> #endif /* __ASM_GENERIC_FTRACE_H__ */
There seems no #endif for CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS.
I wonder how it passed the build. (#ifdef block does not affect over
the file boundary?
Thank you,
--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>