replace nested max/min macros with {max,min}3 macro

Use the new {max,min}3 macros to save some cycles and bytes on the stack.
This patch substitutes trivial nested macros with their counterpart.

Signed-off-by: Hagen Paul Pfeifer <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Hartley Sweeten <[email protected]>
Cc: Russell King <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: Roland Dreier <[email protected]>
Cc: Sean Hefty <[email protected]>
Cc: Pekka Enberg <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Hagen Paul Pfeifer 2010-10-26 14:22:23 -07:00 • committed by Linus Torvalds
commit 732eacc054
8 changed files with 9 additions and 12 deletions

View file

@ -901,7 +901,7 @@ static int transfer_objects(struct array_cache *to,
struct array_cache *from, unsigned int max)
{
/* Figure out how many entries to transfer */
int nr = min(min(from->avail, max), to->limit - to->avail);
int nr = min3(from->avail, max, to->limit - to->avail);
if (!nr)
return 0;