* [PATCH] block: sed-opal: Don't include <linux/kernel.h>
@ 2022-12-03 12:18 Christophe JAILLET
2022-12-05 7:10 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Christophe JAILLET @ 2022-12-03 12:18 UTC (permalink / raw)
To: Jonathan Derrick
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, linux-block
There is no need to include <linux/kernel.h> here.
Prefer the less invasive <linux/types.h> and <linux/compiler_types.h>
which are needed in this .h file itself.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Let see if build-bots agree with me!
---
include/linux/sed-opal.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/include/linux/sed-opal.h b/include/linux/sed-opal.h
index 6f837bb6c715..87f981c70894 100644
--- a/include/linux/sed-opal.h
+++ b/include/linux/sed-opal.h
@@ -11,7 +11,9 @@
#define LINUX_OPAL_H
#include <uapi/linux/sed-opal.h>
-#include <linux/kernel.h>
+
+#include <linux/compiler_types.h> /* for __user */
+#include <linux/types.h>
struct opal_dev;
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] block: sed-opal: Don't include <linux/kernel.h>
2022-12-03 12:18 [PATCH] block: sed-opal: Don't include <linux/kernel.h> Christophe JAILLET
@ 2022-12-05 7:10 ` Christoph Hellwig
2022-12-05 19:09 ` Christophe JAILLET
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2022-12-05 7:10 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Jonathan Derrick, linux-kernel, kernel-janitors, linux-block
On Sat, Dec 03, 2022 at 01:18:49PM +0100, Christophe JAILLET wrote:
> #include <uapi/linux/sed-opal.h>
> -#include <linux/kernel.h>
> +
> +#include <linux/compiler_types.h> /* for __user */
Not sure we really need the comment here, we don't comment on the
other includes either. Also why the added empty line?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] block: sed-opal: Don't include <linux/kernel.h>
2022-12-05 7:10 ` Christoph Hellwig
@ 2022-12-05 19:09 ` Christophe JAILLET
0 siblings, 0 replies; 3+ messages in thread
From: Christophe JAILLET @ 2022-12-05 19:09 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jonathan Derrick, linux-kernel, kernel-janitors, linux-block
Le 05/12/2022 à 08:10, Christoph Hellwig a écrit :
> On Sat, Dec 03, 2022 at 01:18:49PM +0100, Christophe JAILLET wrote:
>> #include <uapi/linux/sed-opal.h>
>> -#include <linux/kernel.h>
>> +
>> +#include <linux/compiler_types.h> /* for __user */
>
> Not sure we really need the comment here, we don't comment on the
> other includes either. Also why the added empty line?
>
Ok for the comment, I'll remove it.
In header files, sometimes, when not obvious, we find such comments.
Sometimes we don't.
For the empty line, it was mostly a matter of taste. My goal was to
explicitly show that one was <uapi/linux, and the other one only <linux/
I'll remove it as well.
My main point, was only to remove kernel.h.
CJ
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-12-05 19:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-03 12:18 [PATCH] block: sed-opal: Don't include <linux/kernel.h> Christophe JAILLET
2022-12-05 7:10 ` Christoph Hellwig
2022-12-05 19:09 ` Christophe JAILLET
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®