Skip to contentSkip to conversation

slob: remove unused funtion

PATCH In review Bob Liu 3 participants 4 messages Jul 10, 2010 Memory management

lore
Share & tools
lore

Bob Liu

author
#0 lore raw

PATCH 1/1 slob: remove unused funtion

funtion struct_slob_page_wrong_size() is not used anymore, remove it

---
 mm/slob.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
mm/slob.c +0 -2
index d582171..832d2b5 100644
@@ -109,8 +109,6 @@ struct slob_page {
 		struct page page;
 	};
 };
-static inline void struct_slob_page_wrong_size(void)
-{ BUILD_BUG_ON(sizeof(struct slob_page) != sizeof(struct page)); }
 
 /*
  * free_slob_page: call before a slob_page is returned to the page allocator.
Signature · 7 lines
1.5.6.3

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#1 lore raw
Quoted 12 lines · Bob Liu

funtion struct_slob_page_wrong_size() is not used anymore, remove it

---
 mm/slob.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
mm/slob.c +0 -0
index d582171..832d2b5 100644

mm/slob.c struct slob_page { · line 113

Quoted 5 lines
mm/slob.c +0 -2
@@ -109,8 +109,6 @@ struct slob_page {
 		struct page page;
 	};
 };
-static inline void struct_slob_page_wrong_size(void)
-{ BUILD_BUG_ON(sizeof(struct slob_page) != sizeof(struct page)); }

It is not unused! Try `make mm/slob.o' with the following patch applied:

mm/slob.c +1 -0
index 23631e2..d50ff8e 100644
@@ -106,6 +106,7 @@ struct slob_page {
 		};
 		struct page page;
 	};
+	unsigned long foo;
 };
 static inline void struct_slob_page_wrong_size(void)
 { BUILD_BUG_ON(sizeof(struct slob_page) != sizeof(struct page)); }

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

author
#2 lore raw
Quoted 8 lines · Johannes Weiner
Quoted 7 lines · Bob Liu

funtion struct_slob_page_wrong_size() is not used anymore, remove it

---
 mm/slob.c |    2 --

 1 files changed, 0 insertions(+), 2 deletions(-)
Quoted 14 lines

mm/slob.c struct slob_page { · line 113

Quoted 10 lines
mm/slob.c +0 -2
index d582171..832d2b5 100644
@@ -109,8 +109,6 @@ struct slob_page {
               struct page page;
       };
  };
-static inline void struct_slob_page_wrong_size(void)
-{ BUILD_BUG_ON(sizeof(struct slob_page) != sizeof(struct page)); }

It is not unused!  Try `make mm/slob.o' with the following patch applied:

Why ?
And I can compile it successfully after remove this funtion. Thanks.

Quoted 13 lines
mm/slob.c +1 -0
index 23631e2..d50ff8e 100644
@@ -106,6 +106,7 @@ struct slob_page {
                };
                struct page page;
        };
+       unsigned long foo;
  };
  static inline void struct_slob_page_wrong_size(void)
  { BUILD_BUG_ON(sizeof(struct slob_page) != sizeof(struct page)); }
Signature · 8 lines
Regards,
--Bob

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#3 lore raw
In reply to Bob Liu
Quoted 12 lines · Bob Liu

funtion struct_slob_page_wrong_size() is not used anymore, remove it

---
 mm/slob.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
mm/slob.c +0 -0
index d582171..832d2b5 100644

mm/slob.c struct slob_page { · line 113

Quoted 5 lines
mm/slob.c +0 -2
@@ -109,8 +109,6 @@ struct slob_page {
 		struct page page;
 	};
 };
-static inline void struct_slob_page_wrong_size(void)
-{ BUILD_BUG_ON(sizeof(struct slob_page) != sizeof(struct page)); }

This function exists to raise a compile error if the structure sizes mismatch, and doesn't actually get included in the compiled output.

Signature · 8 lines
Mathematics is the supreme nostalgia of our time.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>