linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Khalid Ali <khaliidcaliy@gmail.com>
To: tglx@linutronix.de
Cc: khaliidcaliy@gmail.com, linux-kernel@vger.kernel.org,
	luto@kernel.org, peterz@infradead.org
Subject: Re: [PATCH] kernel/entry: Remove unneeded header "common.h"
Date: Sat, 14 Jun 2025 19:47:46 +0000	[thread overview]
Message-ID: <20250614194829.10832-1-khaliidcaliy@gmail.com> (raw)
In-Reply-To: <875xgziprs.ffs@tglx>

> 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.

  reply	other threads:[~2025-06-14 19:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11  7:23 [PATCH] kernel/entry: Remove unneeded header "common.h" Khalid Ali
2025-06-13 16:12 ` Thomas Gleixner
2025-06-14 19:47   ` Khalid Ali [this message]
2025-06-16  7:01     ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250614194829.10832-1-khaliidcaliy@gmail.com \
    --to=khaliidcaliy@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).