Le 20/10/2022 à 19:29, Naveen N. Rao a écrit :
> Many of these headers are not necessary since those are included
> indirectly, or the code using those headers has been removed.

It is usually not a good idea to not include headers because they are 
already included indirectly. If one day for some reason de indirect link 
gets removed, then your file doesn't build anymore.

> 
> Signed-off-by: Naveen N. Rao <naveen.n....@linux.vnet.ibm.com>
> ---
>   arch/powerpc/kernel/kprobes-ftrace.c | 4 ----
>   arch/powerpc/kernel/kprobes.c        | 2 --
>   2 files changed, 6 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/kprobes-ftrace.c 
> b/arch/powerpc/kernel/kprobes-ftrace.c
> index 072ebe7f290ba7..08ed8a158fd724 100644
> --- a/arch/powerpc/kernel/kprobes-ftrace.c
> +++ b/arch/powerpc/kernel/kprobes-ftrace.c
> @@ -7,10 +7,6 @@
>    *            IBM Corporation
>    */
>   #include <linux/kprobes.h>
> -#include <linux/ptrace.h>
> -#include <linux/hardirq.h>
> -#include <linux/preempt.h>
> -#include <linux/ftrace.h>
>   
>   /* Ftrace callback handler for kprobes */
>   void kprobe_ftrace_handler(unsigned long nip, unsigned long parent_nip,
> diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
> index 86ca5a61ea9afb..3bf2507f07e6c6 100644
> --- a/arch/powerpc/kernel/kprobes.c
> +++ b/arch/powerpc/kernel/kprobes.c
> @@ -14,8 +14,6 @@
>    */
>   
>   #include <linux/kprobes.h>
> -#include <linux/ptrace.h>
> -#include <linux/preempt.h>
>   #include <linux/extable.h>
>   #include <linux/kdebug.h>
>   #include <linux/slab.h>

Reply via email to