diff mbox series

[2/6] hugetlb_cgroup: remove unneeded header file

Message ID 20220728121949.20985-3-linmiaohe@huawei.com (mailing list archive)
State New
Headers show
Series A few cleanup patches for hugetlb_cgroup | expand

Commit Message

Miaohe Lin July 28, 2022, 12:19 p.m. UTC
The header file slab.h is unneeded now. Remove it.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 mm/hugetlb_cgroup.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Mina Almasry July 28, 2022, 5:45 p.m. UTC | #1
On Thu, Jul 28, 2022 at 5:20 AM Miaohe Lin <linmiaohe@huawei.com> wrote:
>
> The header file slab.h is unneeded now. Remove it.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Acked-by: Mina Almasry <almasrymina@google.com>

> ---
>  mm/hugetlb_cgroup.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c
> index d16eb00c947d..99e9a367e1e5 100644
> --- a/mm/hugetlb_cgroup.c
> +++ b/mm/hugetlb_cgroup.c
> @@ -19,7 +19,6 @@
>
>  #include <linux/cgroup.h>
>  #include <linux/page_counter.h>
> -#include <linux/slab.h>
>  #include <linux/hugetlb.h>
>  #include <linux/hugetlb_cgroup.h>
>
> --
> 2.23.0
>
Mina Almasry July 28, 2022, 6:02 p.m. UTC | #2
On Thu, Jul 28, 2022 at 10:45 AM Mina Almasry <almasrymina@google.com> wrote:
>
> On Thu, Jul 28, 2022 at 5:20 AM Miaohe Lin <linmiaohe@huawei.com> wrote:
> >
> > The header file slab.h is unneeded now. Remove it.
> >
> > Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
>
> Acked-by: Mina Almasry <almasrymina@google.com>
>

Actually, sorry, but this file calls kzalloc_node() which comes from
linux/slab.h, no? Can we keep the include then? slab.h is probably
included by other include files but for clarity it's better that
hugetlb_cgroup.c to include slab.h if it is calling functions declared
there.

> > ---
> >  mm/hugetlb_cgroup.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c
> > index d16eb00c947d..99e9a367e1e5 100644
> > --- a/mm/hugetlb_cgroup.c
> > +++ b/mm/hugetlb_cgroup.c
> > @@ -19,7 +19,6 @@
> >
> >  #include <linux/cgroup.h>
> >  #include <linux/page_counter.h>
> > -#include <linux/slab.h>
> >  #include <linux/hugetlb.h>
> >  #include <linux/hugetlb_cgroup.h>
> >
> > --
> > 2.23.0
> >
Miaohe Lin July 29, 2022, 1:07 a.m. UTC | #3
On 2022/7/29 2:02, Mina Almasry wrote:
> On Thu, Jul 28, 2022 at 10:45 AM Mina Almasry <almasrymina@google.com> wrote:
>>
>> On Thu, Jul 28, 2022 at 5:20 AM Miaohe Lin <linmiaohe@huawei.com> wrote:
>>>
>>> The header file slab.h is unneeded now. Remove it.
>>>
>>> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
>>
>> Acked-by: Mina Almasry <almasrymina@google.com>
>>
> 
> Actually, sorry, but this file calls kzalloc_node() which comes from
> linux/slab.h, no? Can we keep the include then? slab.h is probably
> included by other include files but for clarity it's better that
> hugetlb_cgroup.c to include slab.h if it is calling functions declared
> there.

I have browsed the code to verify it but I still missed kzalloc_node in this file.
Will drop this patch. Many thanks for your review.

> 
>>> ---
>>>  mm/hugetlb_cgroup.c | 1 -
>>>  1 file changed, 1 deletion(-)
>>>
>>> diff --git a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c
>>> index d16eb00c947d..99e9a367e1e5 100644
>>> --- a/mm/hugetlb_cgroup.c
>>> +++ b/mm/hugetlb_cgroup.c
>>> @@ -19,7 +19,6 @@
>>>
>>>  #include <linux/cgroup.h>
>>>  #include <linux/page_counter.h>
>>> -#include <linux/slab.h>
>>>  #include <linux/hugetlb.h>
>>>  #include <linux/hugetlb_cgroup.h>
>>>
>>> --
>>> 2.23.0
>>>
> .
>
diff mbox series

Patch

diff --git a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c
index d16eb00c947d..99e9a367e1e5 100644
--- a/mm/hugetlb_cgroup.c
+++ b/mm/hugetlb_cgroup.c
@@ -19,7 +19,6 @@ 
 
 #include <linux/cgroup.h>
 #include <linux/page_counter.h>
-#include <linux/slab.h>
 #include <linux/hugetlb.h>
 #include <linux/hugetlb_cgroup.h>