Skip to contentSkip to conversation

CGROUPS: includecheck fix for include/linux/page_cgroup.h

PATCH In review Jaswinder Singh Rajput 2 participants 2 messages Aug 9, 2009 – Aug 10, 2009 1 message not in the archive MM core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CGROUPS: includecheck fix for include/linux/page_cgroup.h

fix the following 'make includecheck' warning:

include/linux/page_cgroup.h: linux/swap.h is included more than once.

---
 include/linux/page_cgroup.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
include/linux/page_cgroup.h +2 -2
index 13f126c..ada779f 100644
@@ -105,14 +105,14 @@ static inline void __init page_cgroup_init_flatmem(void)
 
 #endif
 
-#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
 #include <linux/swap.h>
+
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
 extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id);
 extern unsigned short lookup_swap_cgroup(swp_entry_t ent);
 extern int swap_cgroup_swapon(int type, unsigned long max_pages);
 extern void swap_cgroup_swapoff(int type);
 #else
-#include <linux/swap.h>
 
 static inline
 unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id)
Signature · 1 line
1.6.0.6

A message that is not in the archive (sent off-list or not yet received): [email protected]

Acked-by
#2 lore raw
Quoted 6 lines · Jaswinder Singh Rajput

fix the following 'make includecheck' warning:

 include/linux/page_cgroup.h: linux/swap.h is included more than once.

Thanks.

Paul

Quoted 30 lines

---
 include/linux/page_cgroup.h |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
include/linux/page_cgroup.h +2 -2
index 13f126c..ada779f 100644
@@ -105,14 +105,14 @@ static inline void __init page_cgroup_init_flatmem(void)
 
  #endif
 
-#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
  #include <linux/swap.h>
+
+#ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP
  extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id);
  extern unsigned short lookup_swap_cgroup(swp_entry_t ent);
  extern int swap_cgroup_swapon(int type, unsigned long max_pages);
  extern void swap_cgroup_swapoff(int type);
  #else
-#include <linux/swap.h>
 

 static inline
 unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id) --
1.6.0.6