Re: [PATCH 1/3] swsusp: rework swsusp_suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sunday, 30 of October 2005 18:54, Ingo Oeser wrote:
> 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 :-)

Of course you're right, I'll do that.

Thanks a lot for the comment.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux