[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250614194829.10832-1-khaliidcaliy@gmail.com>
Date: Sat, 14 Jun 2025 19:47:46 +0000
From: Khalid Ali <khaliidcaliy@...il.com>
To: tglx@...utronix.de
Cc: khaliidcaliy@...il.com,
linux-kernel@...r.kernel.org,
luto@...nel.org,
peterz@...radead.org
Subject: Re: [PATCH] kernel/entry: Remove unneeded header "common.h"
> The reason why common.h exists is that syscall_user_dispatch() is a
> internal function, which is on purpose not exposed globally. There is no
> reason to expose it globally, so it stays where it is.
> Still there is no strong reason "common.h" could exist, there is no doc
> explicitly mentions that.
Why can't we just put the prototype into the source since currently it is the
only place used is common.c, so we should put it on top of the source. Again don't
see strong reason why entire header exist for single function, even on future if more local
definations come we should put on top of the source, if there is one single source file using
it. This makes consistent across the entire kernel codebase which mostly do what i mentioned.
The only exception for local headers is if the source file using it is too large and using many
structures, enums and prototypes, in that case it is acceptable. However the decision of creation
of that local header with no exception makes the header pointless.
I didn't find any kernel doc that describes the decision, so we should make it consistent with other
subsystems if there is no specific reason for that this makes the source file more organized.
Powered by blists - more mailing lists