Hi Rafael, On Sunday 30 October 2005 16:40, Rafael J. Wysocki wrote: > This patch makes only the functions in swsusp.c call functions in snapshot.c > and not both ways. Basically, it moves the code without changing its > functionality. This is not quite true. > #else > -static int save_highmem(void) { return 0; } > +int save_highmem(void) { return 0; } > int restore_highmem(void) { return 0; } > #endif /* CONFIG_HIGHMEM */ Here you change code, which will be optimized completely away to an empty function, which bloats the kernel. Please put these two functions into a local header like this: #ifdef CONFIG_HIGHMEM int save_highmem(void); int restore_highmem(void); #else static inline int save_highmem(void) { return 0; } static inline int restore_highmem(void) { return 0; } #endif That way no having no highmem means, this code is not used at all and everything using the return code and expecting != 0 is going to be optimized away. I think everyone CCed will agree here :-) Many thanks & Regards Ingo Oeser
Attachment:
pgpY4iq1ltAwz.pgp
Description: PGP signature
- Follow-Ups:
- Re: [PATCH 1/3] swsusp: rework swsusp_suspend
- From: "Rafael J. Wysocki" <[email protected]>
- Re: [PATCH 1/3] swsusp: rework swsusp_suspend
- References:
- [PATCH 0/3] swsusp: code separation continued
- From: "Rafael J. Wysocki" <[email protected]>
- [PATCH 1/3] swsusp: rework swsusp_suspend
- From: "Rafael J. Wysocki" <[email protected]>
- [PATCH 0/3] swsusp: code separation continued
- Prev by Date: Re: [PATCH][MCAST]IPv6: doubt about ipv6_sk_mc_lock usage.
- Next by Date: Re: [ketchup] patch to allow for moving of .gitignore in 2.6.14
- Previous by thread: [PATCH 1/3] swsusp: rework swsusp_suspend
- Next by thread: Re: [PATCH 1/3] swsusp: rework swsusp_suspend
- Index(es):