Skip to contentSkip to conversation

kernel.h: Drop unneeded <linux/kernel.h> inclusion from other headers

PATCH Superseded Andy Shevchenko 2 participants 5 messages Oct 28, 2020 – Jan 12, 2021 Locking primitives

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel.h: Drop unneeded <linux/kernel.h> inclusion from other headers

There is no evidence we need kernel.h inclusion in certain headers. Drop unneeded <linux/kernel.h> inclusion from other headers.

---
 include/linux/rwsem.h    | 1 -
 include/linux/spinlock.h | 1 -
 2 files changed, 2 deletions(-)
include/linux/rwsem.h +0 -1
index 25e3fde85617..97571bf1286d 100644
@@ -11,7 +11,6 @@
 #include <linux/linkage.h>
 
 #include <linux/types.h>
-#include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/spinlock.h>
 #include <linux/atomic.h>
include/linux/spinlock.h +0 -1
index 79897841a2cc..520f32c93745 100644
@@ -53,7 +53,6 @@
 #include <linux/compiler.h>
 #include <linux/irqflags.h>
 #include <linux/thread_info.h>
-#include <linux/kernel.h>
 #include <linux/stringify.h>
 #include <linux/bottom_half.h>
 #include <linux/lockdep.h>
Signature · 1 line
2.28.0
maintainer
#1 lore raw
Quoted 1 line · Andy Shevchenko

There is no evidence we need kernel.h inclusion in certain headers.

Did you run some tools to determine this or is it just a hunch?

Will

#2 lore raw
Quoted 4 lines · Will Deacon
Quoted 1 line · Andy Shevchenko

There is no evidence we need kernel.h inclusion in certain headers.

Did you run some tools to determine this or is it just a hunch?

I read files manually. So, closer to the latter.
Also I rely on 0day and other CIs that didn't show anything for a long time.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 8 lines · Andy Shevchenko
Quoted 4 lines · Will Deacon
Quoted 1 line · Andy Shevchenko

There is no evidence we need kernel.h inclusion in certain headers.

Did you run some tools to determine this or is it just a hunch?

I read files manually. So, closer to the latter.
Also I rely on 0day and other CIs that didn't show anything for a long time.

Will, any recommendation what should I run to be solid about this change?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#4 lore raw

Hi Andy,

Quoted 11 lines · Andy Shevchenko
Quoted 8 lines · Andy Shevchenko
Quoted 4 lines · Will Deacon
Quoted 1 line · Andy Shevchenko

There is no evidence we need kernel.h inclusion in certain headers.

Did you run some tools to determine this or is it just a hunch?

I read files manually. So, closer to the latter.
Also I rely on 0day and other CIs that didn't show anything for a long time.

Will, any recommendation what should I run to be solid about this change?

Sorry, I don't have any good suggestions here. That's actually why I asked, in case you happened to have something to make these sort of changes less error-prone! So I'm not trying to block this change, it's just a shame that it's not easier to do.

Will