From patchwork Fri Jun 1 13:04:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 10443311 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 8972B602BC for ; Fri, 1 Jun 2018 13:05:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AF7A289AE for ; Fri, 1 Jun 2018 13:05:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F98828D7B; Fri, 1 Jun 2018 13:05:09 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI, 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 0B1B3289AE for ; Fri, 1 Jun 2018 13:05:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752203AbeFANFH (ORCPT ); Fri, 1 Jun 2018 09:05:07 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:42101 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752154AbeFANFC (ORCPT ); Fri, 1 Jun 2018 09:05:02 -0400 Received: by mail-lf0-f66.google.com with SMTP id v135-v6so14744091lfa.9 for ; Fri, 01 Jun 2018 06:05:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RAND20TqlvgYnC1copOaNB/mfJCdREcZw/ohEKeFjpA=; b=UzWem9CJ5B7xbpr8zpDKHdKsXnM6P6zKWzpunN0VaynTOfntdbOZ33+0idvQyRc/wu aNMip8PBE9vtVi4iEWqh2LVUqjsYyZDsmOJh0e9GGPOg1bvczhymMJro4F1EtK6tu0UQ VVmGK9ykWyotg7HPNK3F4eqnPztaO13GHZX5RSj6W6JCUVMaippX0/UpwHdCu7T56KRM lFo+Q7FhEoYNc+svm4GscCLeLq8oSXZl3wvhQdBKBPTbzcWbwz/y785UURA7o9cTtSKD fYH8F+neG0AgbF3K0ie+CfdQqSSRKXmodu8zaJYvmndnFLDldYt6uzF8MwTSljgWA/Az KvtQ== 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=RAND20TqlvgYnC1copOaNB/mfJCdREcZw/ohEKeFjpA=; b=YFCE3hmjzYl+vyH7HQivxrNW4SFjDuRb0l+FXtFZX1DYGIZb1IlK5Uz0XvQz+J3Qxc ywCKnaypaXKC0xFwlQOUu672/CvC9l5tDnO4aYQkWU0RyyvxGzpYW5AqrQNSaRDr7gxZ ZByzeAHMRmL5Ltnkedk71dxJBhPaSI6QtxTl2xw3HYMl660vvyOlR/0d3ibjJxFoJXaz E6SGWpNUdlTMmmmZMm/xCqnVXd+QmW3yS2sgRjuMbh5Xsr2hsfrV8TUUZvxnjtAWw03U cozisA0cu2cNosL/zCk9hmOZvaCfvOzL0qufi0cXAOks8STZLyv3fqs747nCwu5E1qHV ZKEw== X-Gm-Message-State: ALKqPwdQvkUBZ3izIROhtyC4oclbGR+LparD/RmYSGg4GbO6mkFkamQK Js71OIEzDDxG8MyxBOFjqPVQQw== X-Google-Smtp-Source: ADUXVKIgZfuQVy+INo4B/tWqtMS+ukWxBkI6rmP2ewUV8eReW602sehtA1ZGf96kZsEOKlUNUSMr8w== X-Received: by 2002:a19:ce87:: with SMTP id e129-v6mr7066390lfg.57.1527858293080; Fri, 01 Jun 2018 06:04:53 -0700 (PDT) Received: from Macroninja.cnexlabs.com (95-166-82-66-cable.dk.customer.tdc.net. [95.166.82.66]) by smtp.gmail.com with ESMTPSA id g5-v6sm303161lje.21.2018.06.01.06.04.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Jun 2018 06:04:51 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: axboe@fb.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, javier@cnexlabs.com, igor.j.konopko@intel.com, marcin.dziegielewski@intel.com, =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [GIT PULL 07/18] lightnvm: pblk: remove unnecessary indirection Date: Fri, 1 Jun 2018 15:04:21 +0200 Message-Id: <20180601130432.30866-8-mb@lightnvm.io> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180601130432.30866-1-mb@lightnvm.io> References: <20180601130432.30866-1-mb@lightnvm.io> 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 From: Javier González Call nvm_submit_io directly and remove an unnecessary indirection on the read path. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-read.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/lightnvm/pblk-read.c b/drivers/lightnvm/pblk-read.c index b201fc486adb..a2e678de428f 100644 --- a/drivers/lightnvm/pblk-read.c +++ b/drivers/lightnvm/pblk-read.c @@ -102,16 +102,6 @@ static void pblk_read_ppalist_rq(struct pblk *pblk, struct nvm_rq *rqd, #endif } -static int pblk_submit_read_io(struct pblk *pblk, struct nvm_rq *rqd) -{ - int err; - - err = pblk_submit_io(pblk, rqd); - if (err) - return NVM_IO_ERR; - - return NVM_IO_OK; -} static void pblk_read_check_seq(struct pblk *pblk, struct nvm_rq *rqd, sector_t blba) @@ -485,9 +475,9 @@ int pblk_submit_read(struct pblk *pblk, struct bio *bio) rqd->bio = int_bio; r_ctx->private = bio; - ret = pblk_submit_read_io(pblk, rqd); - if (ret) { + if (pblk_submit_io(pblk, rqd)) { pr_err("pblk: read IO submission failed\n"); + ret = NVM_IO_ERR; if (int_bio) bio_put(int_bio); goto fail_end_io;