From: Michal Hocko <mhocko@suse.cz>
To: Vladimir Davydov <vdavydov@parallels.com>
Cc: akpm@linux-foundation.org, hannes@cmpxchg.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH -mm 1/3] page-cgroup: trivial cleanup
Date: Wed, 25 Jun 2014 08:52:38 +0200 [thread overview]
Message-ID: <20140625065238.GA10223@dhcp22.suse.cz> (raw)
In-Reply-To: <9f5abf8dcb07fe5462f12f81867f199c22e883d3.1403626729.git.vdavydov@parallels.com>
On Tue 24-06-14 20:33:04, Vladimir Davydov wrote:
> Add forward declarations for struct pglist_data, mem_cgroup.
>
> Remove __init, __meminit from function prototypes and inline functions.
>
> Remove redundant inclusion of bit_spinlock.h.
>
> Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
> ---
> include/linux/page_cgroup.h | 22 +++++++++++-----------
> 1 file changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h
> index 97b5c39a31c8..23863edb95ff 100644
> --- a/include/linux/page_cgroup.h
> +++ b/include/linux/page_cgroup.h
> @@ -12,8 +12,10 @@ enum {
> #ifndef __GENERATING_BOUNDS_H
> #include <generated/bounds.h>
>
> +struct pglist_data;
> +
> #ifdef CONFIG_MEMCG
> -#include <linux/bit_spinlock.h>
> +struct mem_cgroup;
>
> /*
> * Page Cgroup can be considered as an extended mem_map.
> @@ -27,16 +29,16 @@ struct page_cgroup {
> struct mem_cgroup *mem_cgroup;
> };
>
> -void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat);
> +extern void pgdat_page_cgroup_init(struct pglist_data *pgdat);
>
> #ifdef CONFIG_SPARSEMEM
> -static inline void __init page_cgroup_init_flatmem(void)
> +static inline void page_cgroup_init_flatmem(void)
> {
> }
> -extern void __init page_cgroup_init(void);
> +extern void page_cgroup_init(void);
> #else
> -void __init page_cgroup_init_flatmem(void);
> -static inline void __init page_cgroup_init(void)
> +extern void page_cgroup_init_flatmem(void);
> +static inline void page_cgroup_init(void)
> {
> }
> #endif
> @@ -48,11 +50,10 @@ static inline int PageCgroupUsed(struct page_cgroup *pc)
> {
> return test_bit(PCG_USED, &pc->flags);
> }
> -
> -#else /* CONFIG_MEMCG */
> +#else /* !CONFIG_MEMCG */
> struct page_cgroup;
>
> -static inline void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
> +static inline void pgdat_page_cgroup_init(struct pglist_data *pgdat)
> {
> }
>
> @@ -65,10 +66,9 @@ static inline void page_cgroup_init(void)
> {
> }
>
> -static inline void __init page_cgroup_init_flatmem(void)
> +static inline void page_cgroup_init_flatmem(void)
> {
> }
> -
> #endif /* CONFIG_MEMCG */
>
> #include <linux/swap.h>
> --
> 1.7.10.4
>
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2014-06-25 6:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-24 16:33 Vladimir Davydov
2014-06-24 16:33 ` [PATCH -mm 2/3] page-cgroup: get rid of NR_PCG_FLAGS Vladimir Davydov
2014-06-25 4:01 ` Johannes Weiner
2014-06-25 6:55 ` Michal Hocko
2014-06-24 16:33 ` [PATCH -mm 3/3] page-cgroup: fix flags definition Vladimir Davydov
2014-06-24 23:20 ` Andrew Morton
2014-06-25 4:05 ` Johannes Weiner
2014-06-25 6:58 ` Michal Hocko
2014-06-25 4:01 ` [PATCH -mm 1/3] page-cgroup: trivial cleanup Johannes Weiner
2014-06-25 6:52 ` Michal Hocko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140625065238.GA10223@dhcp22.suse.cz \
--to=mhocko@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vdavydov@parallels.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox