* [PATCH -next] proc: Remove unnecessary interrupts.c include
@ 2024-04-28 9:48 Jinjie Ruan
2024-04-29 16:35 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Jinjie Ruan @ 2024-04-28 9:48 UTC (permalink / raw)
To: akpm, mcgrof, j.granados, brauner, david, willy, oleg,
linux-kernel, linux-fsdevel
Cc: ruanjinjie
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.
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
---
fs/proc/interrupts.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/proc/interrupts.c b/fs/proc/interrupts.c
index cb0edc7cbf09..463a0f754edf 100644
--- 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>
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] proc: Remove unnecessary interrupts.c include
2024-04-28 9:48 [PATCH -next] proc: Remove unnecessary interrupts.c include Jinjie Ruan
@ 2024-04-29 16:35 ` Andrew Morton
2024-04-30 1:23 ` Jinjie Ruan
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2024-04-29 16:35 UTC (permalink / raw)
To: Jinjie Ruan
Cc: mcgrof, j.granados, brauner, david, willy, oleg, linux-kernel,
linux-fsdevel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -next] proc: Remove unnecessary interrupts.c include
2024-04-29 16:35 ` Andrew Morton
@ 2024-04-30 1:23 ` Jinjie Ruan
0 siblings, 0 replies; 3+ messages in thread
From: Jinjie Ruan @ 2024-04-30 1:23 UTC (permalink / raw)
To: Andrew Morton
Cc: mcgrof, j.granados, brauner, david, willy, oleg, linux-kernel,
linux-fsdevel
On 2024/4/30 0:35, Andrew Morton wrote:
> 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.
Thank you, sorry I'm just learning the rules now.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-04-30 1:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-28 9:48 [PATCH -next] proc: Remove unnecessary interrupts.c include Jinjie Ruan
2024-04-29 16:35 ` Andrew Morton
2024-04-30 1:23 ` Jinjie Ruan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.