Linux-Fsdevel Archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: <mcgrof@kernel.org>, <j.granados@samsung.com>,
	<brauner@kernel.org>, <david@redhat.com>, <willy@infradead.org>,
	<oleg@redhat.com>, <linux-kernel@vger.kernel.org>,
	<linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH -next] proc: Remove unnecessary interrupts.c include
Date: Mon, 29 Apr 2024 09:35:49 -0700	[thread overview]
Message-ID: <20240429093549.f2b9c670f383bed627022f31@linux-foundation.org> (raw)
In-Reply-To: <20240428094847.42521-1-ruanjinjie@huawei.com>

On Sun, 28 Apr 2024 17:48:47 +0800 Jinjie Ruan <ruanjinjie@huawei.com> wrote:

> The irqnr.h is included in interrupts.h and the fs.h is included in
> proc_fs.h, they are unnecessary included in interrupts.c, so remove it.
> 
> ...
>
> --- a/fs/proc/interrupts.c
> +++ b/fs/proc/interrupts.c
> @@ -1,8 +1,6 @@
>  // SPDX-License-Identifier: GPL-2.0
> -#include <linux/fs.h>
>  #include <linux/init.h>
>  #include <linux/interrupt.h>
> -#include <linux/irqnr.h>
>  #include <linux/proc_fs.h>
>  #include <linux/seq_file.h>

Within limits, we prefer that .c files directly include the headers
which they use.  If interrupts.c uses nothing from these headers then
OK.  If, however, interrupts.c does use things which are defined in
these headers then the inclusion of those headers is desired.

  reply	other threads:[~2024-04-29 16:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-28  9:48 [PATCH -next] proc: Remove unnecessary interrupts.c include Jinjie Ruan
2024-04-29 16:35 ` Andrew Morton [this message]
2024-04-30  1:23   ` Jinjie Ruan

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=20240429093549.f2b9c670f383bed627022f31@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=david@redhat.com \
    --cc=j.granados@samsung.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=oleg@redhat.com \
    --cc=ruanjinjie@huawei.com \
    --cc=willy@infradead.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).