Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752178AbeABKDZ (ORCPT + 1 other); Tue, 2 Jan 2018 05:03:25 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:34333 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751366AbeABKDX (ORCPT ); Tue, 2 Jan 2018 05:03:23 -0500 X-Google-Smtp-Source: ACJfBotR+t2P4kvFQbPdPADTSwjX8qyyNS5FEM9XtFMINgmmMQYC4FbuxLtWfXtrRlHS/klczY4OYw== From: Joey Pabalinas To: linux-mm@kvack.org Cc: sjenning@redhat.com, ddstreet@ieee.org, linux-kernel@vger.kernel.org, Joey Pabalinas Subject: [PATCH 0/2] mm/zswap: add minor const/conditional optimizations Date: Tue, 2 Jan 2018 00:03:18 -1000 Message-Id: <20180102100320.24801-1-joeypabalinas@gmail.com> X-Mailer: git-send-email 2.15.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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