Subject: Re: [PATCH 5/5] powerpc/kprobes: Remove unnecessary headers from kprobes

From: "Naveen N. Rao" <[email-masked]>
Date: Tue, 08 Nov 2022 15:36:30 +0530

Christophe Leroy wrote:
> 
> 
> 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.

I agree with that in general.

The motivation for this patch was to remove <linux/preempt.h> from 
kprobes-ftrace.c since we got rid of explicit preempt disable/enable 
calls in the past. We have also removed explicit irq disable from this 
path. <linux/kprobes.h> includes <linux/ftrace.h> and <asm/kprobes.h> 
includes <linux/ptrace.h> so those could go too.

I don't expect those header dependencies to change, so I think this 
patch is ok.

- Naveen