Received: by 10.192.165.148 with SMTP id m20csp3555215imm; Mon, 30 Apr 2018 02:13:06 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoUHrGC2NXSrB7UoignOGcnIUJCts3iiPwhfdEAmT6PBU38HKgSuutoNatWxqGm+xM8ZI0y X-Received: by 2002:a65:4844:: with SMTP id i4-v6mr9415933pgs.191.1525079586311; Mon, 30 Apr 2018 02:13:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525079586; cv=none; d=google.com; s=arc-20160816; b=r2fQHCspDAPCsjfllOpRKY7yfn82Vg3UEJ2aqtI+XZrltm50XbJoSPolb8APr6VQkn I5MVL69amMJnq6aONz2QrjYnJw6xZB0k3ooVqTM3GZ9pCnH+HdGJnrglsuBmnsgPnLIa 1sdN/UEWvsJoM/IsVMxBEogDHlAsiCGI/k/ameLfWjOwTaJjQWgbtGwEBXH62YkBNeEq 1kpL+CD0e0DpztlqmZ7FlSyhJwpA5mCJD3bMMbkAUxC9m4EUbZ8iQ021UNQZCjyAK8ZG mgAInuiFMdesfrULGGwHycLIhWcFMs4hxb8IitZ0nm0YjkeIGK/8D8wsXA/dZZU4fMAI e8gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=5OAQpfUgiQ1kp4yOTfgKyHpS8eznwzYX6DZhu4bTQfE=; b=mm5tVObzJAsGZDRiNPk8XXKSXrsi05qaI3pUymfetiBwg/plsP7PSUANvOe+tiJd7B BNQYIS85XO/fmHqrvb2ZlpOEchLmTixw/0cO47veCdjhNUh0bxs290LmpeI6Y47IkbMz GG5hvpsIVzdPlxEoLcLgu6m5wvd3r0x6busBPNBvGAH4NzMfSuCObUd4oDMleDCGk68L MDmAhj29cd8Vj3JGwzTNt9EjfoywVSVqLoKOiTwpAQeIRqrpn1H6SgLrm3YfLMpGXYSv rPfdjhHyyM3r9x5q3MMzRBeRyJnfNwKjUiYDlUf50OlAV17P1K0mi1zX01kF2YHZ/rFf zLzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@javigon-com.20150623.gappssmtp.com header.s=20150623 header.b=uGWz/iOK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v32-v6si7115000plb.575.2018.04.30.02.12.52; Mon, 30 Apr 2018 02:13:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@javigon-com.20150623.gappssmtp.com header.s=20150623 header.b=uGWz/iOK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753335AbeD3JMF (ORCPT + 99 others); Mon, 30 Apr 2018 05:12:05 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:50661 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753740AbeD3JKX (ORCPT ); Mon, 30 Apr 2018 05:10:23 -0400 Received: by mail-wm0-f66.google.com with SMTP id t11so11930795wmt.0 for ; Mon, 30 Apr 2018 02:10:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=javigon-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5OAQpfUgiQ1kp4yOTfgKyHpS8eznwzYX6DZhu4bTQfE=; b=uGWz/iOKhLy6KOJu2yG4ggqS1P3t2GrRgQi7b07XYjx6GEPUO34l2/SmYEQHqxWTVc YHQjRckuYfuLdwf6/a0ohSedaiDNw7X3H528ZuXO+zFRdom1EbwBYkhoCQER3D7ukUkA TZkPKoDENDL0OcFM4rVWh4ax6MNLmSwYyBwzWcpewROPsgpJddlVNLfv26NK2eaSPu65 Rn2+5rVofzPeoIpTtqPxyBkrXJz8G6FT6aPugvSc6kFKNiz5bPgW/HaTC+i4Zgz3wAnB ICSIU1Ftdp9Btn5CGk5vy4nkKTIdhaVV1slbQ9CjUVwKJDN/tfcafgSaAikSEXjPBBKd qvmA== 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=5OAQpfUgiQ1kp4yOTfgKyHpS8eznwzYX6DZhu4bTQfE=; b=PUqEyeaQ2XItnElJD7Qq8zWnbrUUHvq02dzt6jSwJ+pKvJYiq7c46IWrpXxNwDCnxW 5kB7r1tQ5aM6cc2pzal6/faGzEP6NCk5mmhD2/B8Hu9siy9dCKkx7Hx8v/lDmtF2ePDp VTtntXkvbgMpleB3PmWl2Zm5sZYmOl9tmGB8dzhylnpnMArtzTG2s1qxHvKFXhxVoaP3 gfETrQ7vGPhFM0DpfBfVodl0owJabCEeIZmRj4fcl1yIsqsHhAptgNhtLJZ69F2OjS7W PwRHAr8WgJNPCfwZdL9FLds5nPuI/7rrUSbDQ/ZiluMXfdUmA40N4VyLGHw/M6aIa8oE 6zug== X-Gm-Message-State: ALQs6tCDIXL7QmC7eKDnjeHmxAm++946RULKgAgPAZawhNqclMnJmA17 gHdFgNpoHz3y1DWXa5E6mt/gvg== X-Received: by 2002:a50:af64:: with SMTP id g91-v6mr15980459edd.57.1525079422626; Mon, 30 Apr 2018 02:10:22 -0700 (PDT) Received: from uhalley.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id b56-v6sm2108638edd.85.2018.04.30.02.10.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Apr 2018 02:10:22 -0700 (PDT) From: "=?UTF-8?q?Javier=20Gonz=C3=A1lez?=" X-Google-Original-From: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= To: mb@lightnvm.io Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Javier=20Gonz=C3=A1lez?= Subject: [PATCH 07/11] lightnvm: pblk: remove unnecessary indirection Date: Mon, 30 Apr 2018 11:10:05 +0200 Message-Id: <1525079409-6588-8-git-send-email-javier@cnexlabs.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525079409-6588-1-git-send-email-javier@cnexlabs.com> References: <1525079409-6588-1-git-send-email-javier@cnexlabs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Call nvm_submit_io directly and remove an unnecessary indirection on the read path. Signed-off-by: Javier González --- 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; -- 2.7.4