Skip to contentSkip to conversation

mm: Fix build error with !CONFIG_HUGETLBFS

PATCH In review Frans Pop 2 participants 3 messages Feb 10, 2009 – Feb 11, 2009 HugeTLB

lore
Share & tools
lore

Frans Pop

author
#0 lore raw

PATCH 1/1 mm: Fix build error with !CONFIG_HUGETLBFS

In commit 5a6fe1259506 an extra parameter was added to hugetlb_file_setup(), but the header file was not updated for the !CONFIG_HUGETLBFS case, which results in:

ipc/shm.c:371:49: error: macro "hugetlb_file_setup" passed 3 arguments,
but takes just 2

include/linux/hugetlb.h +3 -3
index af09660..03de70f 100644
@@ -159,9 +159,9 @@ static inline void set_file_hugepages(struct file *file)
 }
 #else /* !CONFIG_HUGETLBFS */
 
-#define is_file_hugepages(file)		0
-#define set_file_hugepages(file)	BUG()
-#define hugetlb_file_setup(name,size)	ERR_PTR(-ENOSYS)
+#define is_file_hugepages(file)			0
+#define set_file_hugepages(file)		BUG()
+#define hugetlb_file_setup(name,size,int)	ERR_PTR(-ENOSYS)
 
 #endif /* !CONFIG_HUGETLBFS */
 
#1 lore raw
Quoted 15 lines · Frans Pop

In commit 5a6fe1259506 an extra parameter was added to hugetlb_file_setup(), but the header file was not updated for the !CONFIG_HUGETLBFS case, which results in:

ipc/shm.c:371:49: error: macro "hugetlb_file_setup" passed 3 arguments,
but takes just 2

include/linux/hugetlb.h +0 -0
index af09660..03de70f 100644

include/linux/hugetlb.h static inline void set_file_hugepages(struct · line 165

Quoted 10 lines
include/linux/hugetlb.h +3 -3
@@ -159,9 +159,9 @@ static inline void set_file_hugepages(struct  
 file *file)
 }
 #else /* !CONFIG_HUGETLBFS */
 
-#define is_file_hugepages(file)		0
-#define set_file_hugepages(file)	BUG()
-#define hugetlb_file_setup(name,size)	ERR_PTR(-ENOSYS)
+#define is_file_hugepages(file)			0
+#define set_file_hugepages(file)		BUG()
+#define hugetlb_file_setup(name,size,int)	ERR_PTR(-ENOSYS)

might be slightly better as:

#define hugetlb_file_setup(name,size,acctflag) ERR_PTR(-ENOSYS)

otherwise ack.

- k

author
#2 lore raw
Quoted 5 lines · Kumar Gala

might be slightly better as:

#define hugetlb_file_setup(name,size,acctflag) ERR_PTR(-ENOSYS)

otherwise ack.

Yes, I see. Better to take the patch from Stefan Richter then:
http://lkml.org/lkml/2009/2/10/396