2022-02-08 08:43:49

by Christoph Hellwig

[permalink] [raw]
Subject: [PATCH 2/8] mm: remove the __KERNEL__ guard from <linux/mm.h>

__KERNEL__ ifdefs don't make sense outside of include/uapi/.

Signed-off-by: Christoph Hellwig <[email protected]>
---
include/linux/mm.h | 4 ----
1 file changed, 4 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index 213cc569b19223..7b46174989b086 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -3,9 +3,6 @@
#define _LINUX_MM_H

#include <linux/errno.h>
-
-#ifdef __KERNEL__
-
#include <linux/mmdebug.h>
#include <linux/gfp.h>
#include <linux/bug.h>
@@ -3381,5 +3378,4 @@ madvise_set_anon_name(struct mm_struct *mm, unsigned long start,
}
#endif

-#endif /* __KERNEL__ */
#endif /* _LINUX_MM_H */
--
2.30.2



2022-02-08 14:57:38

by Chaitanya Kulkarni

[permalink] [raw]
Subject: Re: [PATCH 2/8] mm: remove the __KERNEL__ guard from <linux/mm.h>

On 2/6/22 10:32 PM, Christoph Hellwig wrote:
> __KERNEL__ ifdefs don't make sense outside of include/uapi/.
>
> Signed-off-by: Christoph Hellwig <[email protected]>
> ---
> include/linux/mm.h | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 213cc569b19223..7b46174989b086 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -3,9 +3,6 @@
> #define _LINUX_MM_H
>
> #include <linux/errno.h>
> -
> -#ifdef __KERNEL__
> -
> #include <linux/mmdebug.h>
> #include <linux/gfp.h>
> #include <linux/bug.h>
> @@ -3381,5 +3378,4 @@ madvise_set_anon_name(struct mm_struct *mm, unsigned long start,
> }
> #endif
>
> -#endif /* __KERNEL__ */
> #endif /* _LINUX_MM_H */
>

Looks good.

Reviewed-by: Chaitanya Kulkarni <[email protected]>

2022-02-09 07:01:57

by Jason Gunthorpe

[permalink] [raw]
Subject: Re: [PATCH 2/8] mm: remove the __KERNEL__ guard from <linux/mm.h>

On Mon, Feb 07, 2022 at 07:32:43AM +0100, Christoph Hellwig wrote:
> __KERNEL__ ifdefs don't make sense outside of include/uapi/.
>
> Signed-off-by: Christoph Hellwig <[email protected]>
> ---
> include/linux/mm.h | 4 ----
> 1 file changed, 4 deletions(-)

Reviewed-by: Jason Gunthorpe <[email protected]>

Jason

2022-02-09 10:33:15

by Muchun Song

[permalink] [raw]
Subject: Re: [PATCH 2/8] mm: remove the __KERNEL__ guard from <linux/mm.h>

On Mon, Feb 7, 2022 at 2:42 PM Christoph Hellwig <[email protected]> wrote:
>
> __KERNEL__ ifdefs don't make sense outside of include/uapi/.
>
> Signed-off-by: Christoph Hellwig <[email protected]>

Reviewed-by: Muchun Song <[email protected]>

Thanks.

2022-02-09 12:01:45

by Dan Williams

[permalink] [raw]
Subject: Re: [PATCH 2/8] mm: remove the __KERNEL__ guard from <linux/mm.h>

On Sun, Feb 6, 2022 at 10:33 PM Christoph Hellwig <[email protected]> wrote:
>
> __KERNEL__ ifdefs don't make sense outside of include/uapi/.

Yes.

Reviewed-by: Dan Williams <[email protected]>