Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 490d6ab1 authored by Zach Brown's avatar Zach Brown Committed by Linus Torvalds
Browse files

[PATCH] list.h: don't evaluate macro args multiple times



I noticed that list.h init functions were evaluating macro arguments
multiple times and thought it might be nice to protect the unsuspecting
caller.  Converting the macros to inline functions seems to reduce code
size, too.  A i386 defconfig build with gcc 3.3.3 from fc4:

   text    data     bss     dec     hex filename
3573148  565664  188828 4327640  4208d8 vmlinux.before
3572177  565664  188828 4326669  42050d vmlinux

add/remove: 0/0 grow/shrink: 11/144 up/down: 88/-1016 (-928)

There was no difference in checkstack output.

Signed-off-by: default avatarZach Brown <zach.brown@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent bcc68b86
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment