Skip to content

mm/zswap: add minor const/conditional optimizations

Joey Pabalinas linux-mm lkml 1 version NAK

Status from this message: Nak.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesNAK

Patches in v1

#Subject and filesSizeRepliesApplied
1/2mm/zswap: make type and compressor constmm/zswap.c+6 -41 reply
2/2mm/zswap: move `zswap_has_pool` to front of `if ()`mm/zswap.c+1 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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(-)
Signature · 7 lines
2.15.1

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