From patchwork Fri Jan 5 13:16:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 10146483 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 52F2160244 for ; Fri, 5 Jan 2018 13:18:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42A141FFEB for ; Fri, 5 Jan 2018 13:18:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37659288BA; Fri, 5 Jan 2018 13:18:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA27E1FFEB for ; Fri, 5 Jan 2018 13:18:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751646AbeAENSK (ORCPT ); Fri, 5 Jan 2018 08:18:10 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:45407 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752082AbeAENRG (ORCPT ); Fri, 5 Jan 2018 08:17:06 -0500 Received: by mail-wm0-f66.google.com with SMTP id 9so2389079wme.4 for ; Fri, 05 Jan 2018 05:17:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lE0ZzwwUH5tqkxJGFQn+VcJqirdXqF79ilVWrEXm78c=; b=OBgjX3exzgpKFd3I9ZjA+Ex3osvtfLRBKsWWtQcL0eBDT9KVpUOKwIjus/OSSQNVfr fSLSftBv7zcZ+XMxEohhqpo5L4ovGBiwKxMW9p4XhmlSJWS3F1q2Rjbo0czC1pYs3k2N hqdA6VUDDBNe3Ay9nfThrmk7qEbdBgoSTgh70= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lE0ZzwwUH5tqkxJGFQn+VcJqirdXqF79ilVWrEXm78c=; b=LcKYEMS6HMbQmukhVGeEEx1eqH2WH04FAobvAZQCjJVsNv+KDkfGNkKFXvQG0QUwpr iPQmTzvoLXvL0r/qA0Li5u2jQ5YLNOep0U5FHTkv3Un7s8BVQ5mydWmPuC5W80GUj51b kl/jmuF8McaP16m/M5MHhudaczS6NoRvMj1Bl1GTw7XfhKY6lWrEPvCmDEe5tzV0EIIx qZEl1WXZS0n2R1pyQ2vINdvsmfOMzuQprlKFkE5lTCLkS93PiJ6n6aYvTDCPe8NZL0vf /xMwTj1u4fevd7u/PpU0+3LJYCTpoVqzB3qZkg3Z3FXvlPgHhaWhkf1+4CFckFK7gKBN xbrA== X-Gm-Message-State: AKGB3mIaYEwQP0lMv5mWtk6e/x3MVWXs5Ubcv5f9vyfC+XcxTd7hfKOp v9KAqPuFHos8hc4j/tqJXZDjdQ== X-Google-Smtp-Source: ACJfBoti3UzEBsiXW6uJSRYvQ3D1ATeHRPTTuqJoa80E3VyOXTPX81FzU7PX3a7uDJxMpJGGmQ1WPw== X-Received: by 10.80.131.101 with SMTP id 92mr4188171edh.16.1515158225547; Fri, 05 Jan 2018 05:17:05 -0800 (PST) Received: from skyninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id e46sm4228940edb.93.2018.01.05.05.17.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jan 2018 05:17:04 -0800 (PST) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: axboe@fb.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [GIT PULL 25/25] lightnvm: pblk: refactor pblk_ppa_comp function Date: Fri, 5 Jan 2018 14:16:21 +0100 Message-Id: <20180105131621.20808-26-m@bjorling.me> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180105131621.20808-1-m@bjorling.me> References: <20180105131621.20808-1-m@bjorling.me> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 8af374e..8c357fb 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)