Skip to contentSkip to conversation

kunit: Replace kernel.h with the necessary inclusions

PATCH Applied Andy Shevchenko 2 participants 3 messages Dec 13, 2021 – Dec 15, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 kunit: Replace kernel.h with the necessary inclusions

When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved.

Replace kernel.h inclusion with the list of what is really being used.

---
Andrew, please take it through your tree since KUnit maintainer is non-responsive by unknown (to me) reasons.

 include/kunit/assert.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/kunit/assert.h +1 -1
index ad889b539ab3..ccbc36c0b02f 100644
@@ -10,7 +10,7 @@
 #define _KUNIT_ASSERT_H
 
 #include <linux/err.h>
-#include <linux/kernel.h>
+#include <linux/printk.h>
 
 struct kunit;
 struct string_stream;
Signature · 1 line
2.33.0
Reviewed-by Tested-by on v2 1/1
#1 lore raw
Quoted 7 lines · Andy Shevchenko

When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved.

Replace kernel.h inclusion with the list of what is really being used.

Quoted 3 lines

---
Andrew, please take it through your tree since KUnit maintainer is non-responsive by unknown (to me) reasons.

Sorry, I did not see the previous version of this patch. But this looks fine, and does not appear to break any tests.

#2 lore raw
Quoted 6 lines · Brendan Higgins
Quoted 4 lines · Andy Shevchenko

When kernel.h is used in the headers it adds a lot into dependency hell, especially when there are circular dependencies are involved.

Quoted 6 lines
Quoted 3 lines

Replace kernel.h inclusion with the list of what is really being used.

Thanks!

Quoted 4 lines
Quoted 2 lines

Andrew, please take it through your tree since KUnit maintainer is non-responsive by unknown (to me) reasons.

Sorry, I did not see the previous version of this patch.

Maybe you need to check your email settings and your domain MTA?
https://lore.kernel.org/linux-kselftest/[email protected]/T/#u

Quoted 2 lines

But this
looks fine, and does not appear to break any tests.

Signature · 2 lines
With Best Regards,
Andy Shevchenko