linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] slob: remove unused funtion
@ 2010-07-10 10:05 Bob Liu
  2010-07-10 10:57 ` Johannes Weiner
  2010-07-10 14:57 ` Matt Mackall
  0 siblings, 2 replies; 4+ messages in thread
From: Bob Liu @ 2010-07-10 10:05 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, mpm, hannes, Bob Liu

funtion struct_slob_page_wrong_size() is not used anymore, remove it

Signed-off-by: Bob Liu <lliubbo@gmail.com>
---
 mm/slob.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/mm/slob.c b/mm/slob.c
index d582171..832d2b5 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -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.
-- 
1.5.6.3

--
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>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] slob: remove unused funtion
  2010-07-10 10:05 [PATCH] slob: remove unused funtion Bob Liu
@ 2010-07-10 10:57 ` Johannes Weiner
  2010-07-10 13:26   ` Bob Liu
  2010-07-10 14:57 ` Matt Mackall
  1 sibling, 1 reply; 4+ messages in thread
From: Johannes Weiner @ 2010-07-10 10:57 UTC (permalink / raw)
  To: Bob Liu; +Cc: akpm, linux-mm, mpm

On Sat, Jul 10, 2010 at 06:05:53PM +0800, Bob Liu wrote:
> funtion struct_slob_page_wrong_size() is not used anymore, remove it
> 
> Signed-off-by: Bob Liu <lliubbo@gmail.com>
> ---
>  mm/slob.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/slob.c b/mm/slob.c
> index d582171..832d2b5 100644
> --- a/mm/slob.c
> +++ b/mm/slob.c
> @@ -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:

diff --git a/mm/slob.c b/mm/slob.c
index 23631e2..d50ff8e 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -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 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>

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] slob: remove unused funtion
  2010-07-10 10:57 ` Johannes Weiner
@ 2010-07-10 13:26   ` Bob Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Bob Liu @ 2010-07-10 13:26 UTC (permalink / raw)
  To: Johannes Weiner; +Cc: akpm, linux-mm, mpm

On Sat, Jul 10, 2010 at 6:57 PM, Johannes Weiner <hannes@cmpxchg.org> wrote:
> On Sat, Jul 10, 2010 at 06:05:53PM +0800, Bob Liu wrote:
>> funtion struct_slob_page_wrong_size() is not used anymore, remove it
>>
>> Signed-off-by: Bob Liu <lliubbo@gmail.com>
>> ---
>>  mm/slob.c |    2 --
>>  1 files changed, 0 insertions(+), 2 deletions(-)
>>
>> diff --git a/mm/slob.c b/mm/slob.c
>> index d582171..832d2b5 100644
>> --- a/mm/slob.c
>> +++ b/mm/slob.c
>> @@ -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.

> diff --git a/mm/slob.c b/mm/slob.c
> index 23631e2..d50ff8e 100644
> --- a/mm/slob.c
> +++ b/mm/slob.c
> @@ -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)); }
>



-- 
Regards,
--Bob

--
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] slob: remove unused funtion
  2010-07-10 10:05 [PATCH] slob: remove unused funtion Bob Liu
  2010-07-10 10:57 ` Johannes Weiner
@ 2010-07-10 14:57 ` Matt Mackall
  1 sibling, 0 replies; 4+ messages in thread
From: Matt Mackall @ 2010-07-10 14:57 UTC (permalink / raw)
  To: Bob Liu; +Cc: akpm, linux-mm, hannes

On Sat, 2010-07-10 at 18:05 +0800, Bob Liu wrote:
> funtion struct_slob_page_wrong_size() is not used anymore, remove it
> 
> Signed-off-by: Bob Liu <lliubbo@gmail.com>
> ---
>  mm/slob.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/mm/slob.c b/mm/slob.c
> index d582171..832d2b5 100644
> --- a/mm/slob.c
> +++ b/mm/slob.c
> @@ -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.

-- 
Mathematics is the supreme nostalgia of our time.


--
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>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-07-10 14:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-10 10:05 [PATCH] slob: remove unused funtion Bob Liu
2010-07-10 10:57 ` Johannes Weiner
2010-07-10 13:26   ` Bob Liu
2010-07-10 14:57 ` Matt Mackall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).