Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756079AbdLTRXE (ORCPT ); Wed, 20 Dec 2017 12:23:04 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:40148 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756022AbdLTRWj (ORCPT ); Wed, 20 Dec 2017 12:22:39 -0500 X-Google-Smtp-Source: ACJfBova6/lV4mbUdHXCadmRqsACVHPINfrShU/01SfoJBTYlly3gW0cJu4sWDBe5intx7ycLjKmGQ== From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 25/25] lightnvm: pblk: refactor pblk_ppa_comp function Date: Wed, 20 Dec 2017 18:22:05 +0100 Message-Id: <20171220172205.26464-26-m@bjorling.me> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20171220172205.26464-1-m@bjorling.me> References: <20171220172205.26464-1-m@bjorling.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 695 Lines: 25 Shorten function to simply return the value of the if statement. Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h index 1e9eafd..a1434da 100644 --- a/drivers/lightnvm/pblk.h +++ b/drivers/lightnvm/pblk.h @@ -1047,10 +1047,7 @@ static inline void pblk_ppa_set_empty(struct ppa_addr *ppa_addr) static inline bool pblk_ppa_comp(struct ppa_addr lppa, struct ppa_addr rppa) { - if (lppa.ppa == rppa.ppa) - return true; - - return false; + return (lppa.ppa == rppa.ppa); } static inline int pblk_addr_in_cache(struct ppa_addr ppa) -- 2.9.3