[PATCH 0/2] mm/zswap: add minor const/conditional optimizations

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

 



Make a couple minor short-circuiting order and const changes
  - Since the pointed-to objects are never modified through
    these pointers, const-qualify type and compressor
    variables.
  - Test boolean before calling `strcmp()` to take
    advantage of short-circuiting.

Joey Pabalinas (2):
  mm/zswap: make type and compressor const
  mm/zswap: move `zswap_has_pool` to front of `if ()`

 mm/zswap.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

-- 
2.15.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux