mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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:
parent
f27c85c56b
commit
732eacc054
8 changed files with 9 additions and 12 deletions
|
|
@ -1467,7 +1467,7 @@ static int ablkcipher_add(unsigned int *drestp, struct scatterlist *dst,
|
|||
return -EINVAL;
|
||||
|
||||
while (size) {
|
||||
copy = min(drest, min(size, dst->length));
|
||||
copy = min3(drest, size, dst->length);
|
||||
|
||||
size -= copy;
|
||||
drest -= copy;
|
||||
|
|
@ -1729,7 +1729,7 @@ static int ablkcipher_get(void *saddr, unsigned int *srestp, unsigned int offset
|
|||
return -EINVAL;
|
||||
|
||||
while (size) {
|
||||
copy = min(srest, min(dst->length, size));
|
||||
copy = min3(srest, dst->length, size);
|
||||
|
||||
daddr = kmap_atomic(sg_page(dst), KM_IRQ0);
|
||||
memcpy(daddr + dst->offset + offset, saddr, copy);
|
||||
|
|
|
|||
Loading…
Reference in a new issue