linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/zswap: add minor const/conditional optimizations
@ 2018-01-02 10:03 Joey Pabalinas
  2018-01-02 10:03 ` [PATCH 1/2] mm/zswap: make type and compressor const Joey Pabalinas
  2018-01-02 10:03 ` [PATCH 2/2] mm/zswap: move `zswap_has_pool` to front of `if ()` Joey Pabalinas
  0 siblings, 2 replies; 5+ messages in thread
From: Joey Pabalinas @ 2018-01-02 10:03 UTC (permalink / raw)
  To: linux-mm; +Cc: sjenning, ddstreet, linux-kernel, Joey Pabalinas

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@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-08 19:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-02 10:03 [PATCH 0/2] mm/zswap: add minor const/conditional optimizations Joey Pabalinas
2018-01-02 10:03 ` [PATCH 1/2] mm/zswap: make type and compressor const Joey Pabalinas
2018-01-08 19:22   ` Dan Streetman
2018-01-02 10:03 ` [PATCH 2/2] mm/zswap: move `zswap_has_pool` to front of `if ()` Joey Pabalinas
2018-01-08 19:34   ` Dan Streetman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox