mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51: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
|
|
@ -238,9 +238,7 @@ static inline void vio_cmo_dealloc(struct vio_dev *viodev, size_t size)
|
|||
* memory in this pool does not change.
|
||||
*/
|
||||
if (spare_needed && reserve_freed) {
|
||||
tmp = min(spare_needed, min(reserve_freed,
|
||||
(viodev->cmo.entitled -
|
||||
VIO_CMO_MIN_ENT)));
|
||||
tmp = min3(spare_needed, reserve_freed, (viodev->cmo.entitled - VIO_CMO_MIN_ENT));
|
||||
|
||||
vio_cmo.spare += tmp;
|
||||
viodev->cmo.entitled -= tmp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue