Re: [PATCH v5] alpha: Clean-up the panic notifier code

From: Guilherme G. Piccoli
Date: Sun Oct 15 2023 - 09:55:58 EST


On 10/10/2023 02:16, Maciej W. Rozycki wrote:
> On Sat, 2 Sep 2023, Guilherme G. Piccoli wrote:
>
>> So, let's clean the code and set the notifier to run as the
>> latest, following the same approach other architectures are
>> doing - also, remove the unnecessary include of a header already
>> included indirectly.
>
> FWIW my understanding is our current policy is not to rely on indirect
> inclusions and if a given source relies on declarations or definitions
> provided by a header, then it is supposed to pull it explicitly.
>
> And in any case such an unrelated self-contained change is expected to be
> sent as a separate patch, in a series if there's a mechanical dependency.
>
> Maciej
>

Hi Maciej, thanks for your review!

I'm not sure how the indirect inclusion is happening here. The only
notifier present in this file is a panic notifier, and for this one, we
have the "panic_notifier.h" header. It's like this for many others (if
not all) panic notifiers in the kernel.

Usually the indirect inclusion would happen if some other notifier block
was used for any other reason, and we dropped the "notifier.h" include,
which then would indirectly rely on "panic_notifier.h". In case I'm
talking silly things, let me know! I might not have understood properly
your point (and if so, apologies).

Regarding split in another patch, it can easily be done, but I think
it's quite self-contained now, a simple patch that cleans-up the alpha
notifier. I've done that for other notifiers so far, but I'm OK either
way, as long maintainers are happy and community agrees =)

Cheers,


Guilherme